Skip to content

Commit 00c8428

Browse files
Merge pull request #119 from ColinEberhardt/keywords
Keywords
2 parents e6d3aea + ecb8f8e commit 00c8428

3 files changed

Lines changed: 15 additions & 5 deletions

File tree

Gruntfile.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -170,20 +170,23 @@ module.exports = function(grunt) {
170170
grunt.registerTask('test-javascript', ['eslint', 'karma']);
171171

172172
// Packages the JavaScript as a single UMD module and minifies
173-
grunt.registerTask('package-javascript', ['mkdir:dist', 'includereplace', 'uglify']);
173+
grunt.registerTask('package-javascript', ['includereplace', 'uglify']);
174174

175175
// Packages the Java as a JAR
176-
grunt.registerTask('package-java', ['mkdir:dist', 'shell:javaPackage']);
176+
grunt.registerTask('package-java', ['shell:javaPackage']);
177177

178178
// Packages the C code as a single header
179-
grunt.registerTask('package-c', ['mkdir:dist', 'concat']);
179+
grunt.registerTask('package-c', ['concat']);
180+
181+
// package all languages
182+
grunt.registerTask('package-all', ['package-javascript', 'package-java', 'package-c']);
180183

181184
// Default build, performs the full works!
182-
grunt.registerTask('build', ['test-javascript', 'transpile', 'clean:dist', 'package-javascript', 'package-java', 'package-c']);
185+
grunt.registerTask('build', ['test-javascript', 'transpile', 'clean:dist', 'mkdir:dist', 'package-all']);
183186

184187
// The JavaScript unit tests require Chrome (they need a faithful flexbox implementation
185188
// to test against), so under CI this step is skipped.
186-
grunt.registerTask('ci', ['eslint', 'transpile', 'clean:dist', 'package-javascript', 'package-java', 'package-c']);
189+
grunt.registerTask('ci', ['eslint', 'transpile', 'clean:dist', 'mkdir:dist', 'package-all']);
187190

188191
grunt.registerTask('default', ['build']);
189192
};

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ css-layout [![Build Status](https://travis-ci.org/facebook/css-layout.svg?branch
33

44
This project implements a subset of CSS including flexbox and the box model using pure JavaScript, then transpiled to C and Java. The goal is to have a small standalone library to layout elements. It doesn't rely on the DOM at all.
55

6+
The Java, C and JavaScript version of the code is available via [npm](https://www.npmjs.com/package/css-layout) or directly from the `dist` folder of this repo. The JavaScript version is also available via [cdnjs](https://cdnjs.com/libraries/css-layout).
7+
68
In order to make sure that the code is correct, it is developed in JavaScript using TDD where each commit adds a unit test and the associated code to make it work. All the unit tests are tested against Chrome's implementation of CSS.
79

810
The JavaScript version has been implemented in a way that can be easily transpiled to C and Java via regexes. The layout function doesn't do any allocation nor uses any of the dynamic aspect of JavaScript. The tests are also transpiled to make sure that the implementations are correct everywhere.

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212
"type": "git",
1313
"url": "https://github.com/facebook/css-layout.git"
1414
},
15+
"keywords": [
16+
"css",
17+
"flexbox",
18+
"layout"
19+
],
1520
"author": "",
1621
"license": "BSD",
1722
"bugs": {

0 commit comments

Comments
 (0)