Keywords #119

Merged
ColinEberhardt merged 4 commits from keywords into master 2015-08-31 22:51:59 -07:00
3 changed files with 15 additions and 5 deletions

View File

@@ -170,20 +170,23 @@ module.exports = function(grunt) {
grunt.registerTask('test-javascript', ['eslint', 'karma']); grunt.registerTask('test-javascript', ['eslint', 'karma']);
// Packages the JavaScript as a single UMD module and minifies // Packages the JavaScript as a single UMD module and minifies
grunt.registerTask('package-javascript', ['mkdir:dist', 'includereplace', 'uglify']); grunt.registerTask('package-javascript', ['includereplace', 'uglify']);
// Packages the Java as a JAR // Packages the Java as a JAR
grunt.registerTask('package-java', ['mkdir:dist', 'shell:javaPackage']); grunt.registerTask('package-java', ['shell:javaPackage']);
// Packages the C code as a single header // Packages the C code as a single header
grunt.registerTask('package-c', ['mkdir:dist', 'concat']); grunt.registerTask('package-c', ['concat']);
// package all languages
grunt.registerTask('package-all', ['package-javascript', 'package-java', 'package-c']);
// Default build, performs the full works! // Default build, performs the full works!
grunt.registerTask('build', ['test-javascript', 'transpile', 'clean:dist', 'package-javascript', 'package-java', 'package-c']); grunt.registerTask('build', ['test-javascript', 'transpile', 'clean:dist', 'mkdir:dist', 'package-all']);
// The JavaScript unit tests require Chrome (they need a faithful flexbox implementation // The JavaScript unit tests require Chrome (they need a faithful flexbox implementation
// to test against), so under CI this step is skipped. // to test against), so under CI this step is skipped.
grunt.registerTask('ci', ['eslint', 'transpile', 'clean:dist', 'package-javascript', 'package-java', 'package-c']); grunt.registerTask('ci', ['eslint', 'transpile', 'clean:dist', 'mkdir:dist', 'package-all']);
grunt.registerTask('default', ['build']); grunt.registerTask('default', ['build']);
}; };

View File

@@ -3,6 +3,8 @@ css-layout [![Build Status](https://travis-ci.org/facebook/css-layout.svg?branch
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. 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.
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).
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. 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.
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. 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.

View File

@@ -12,6 +12,11 @@
"type": "git", "type": "git",
"url": "https://github.com/facebook/css-layout.git" "url": "https://github.com/facebook/css-layout.git"
}, },
"keywords": [
"css",
"flexbox",
"layout"
],
"author": "", "author": "",
"license": "BSD", "license": "BSD",
"bugs": { "bugs": {