Skip to content
This repository has been archived by the owner on May 28, 2019. It is now read-only.

Commit

Permalink
add stand alone license for inclusion into ace build
Browse files Browse the repository at this point in the history
  • Loading branch information
chmontgomery committed Apr 2, 2015
1 parent 24e4895 commit e49aa8d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
3 changes: 3 additions & 0 deletions javascript/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ dist/gherkin.js: lib/gherkin/parser.js ../LICENSE node_modules/.fetched
echo '*/' >> $@
./node_modules/.bin/browserify index.js --ignore-missing >> $@

ace: lib/gherkin/parser.js ../LICENSE node_modules/.fetched
./node_modules/.bin/gulp

dist/gherkin.min.js: dist/gherkin.js node_modules/.fetched
mkdir -p `dirname $@`
echo '/*' > $@
Expand Down
15 changes: 13 additions & 2 deletions javascript/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ var through = require('through2');
var path = require('path');
var fs = require('fs');
var insert = require('gulp-insert');
var license = fs.readFileSync(path.join(__dirname, '../LICENSE'), 'utf8');
var rename = require('gulp-rename');
var licensePath = path.join(__dirname, '../LICENSE');
var license = fs.readFileSync(licensePath, 'utf8');

function replaceAll(str, find, replace) {
return str.split(find).join(replace);
Expand Down Expand Up @@ -63,4 +65,13 @@ gulp.task('wrap:node_modules', function () {
.pipe(gulp.dest('./dist/gherkin/tea'))
});

gulp.task('default', ['wrap:gherkin', 'wrap:node_modules']);
gulp.task('stand-alone-license', function () {
gulp.src(licensePath)
.pipe(rename({
extname: ".gherkin"
}))
.pipe(insert.prepend('This license pertains to the file worker-gherkin.js.\n\n'))
.pipe(gulp.dest('./dist/gherkin'))
});

gulp.task('default', ['wrap:gherkin', 'wrap:node_modules', 'stand-alone-license']);
1 change: 1 addition & 0 deletions javascript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"browserify": "^9.0.3",
"gulp": "^3.8.11",
"gulp-insert": "^0.4.0",
"gulp-rename": "^1.2.2",
"gulp-wrap-amd": "^0.5.0",
"mocha": "^2.1.0",
"through2": "^0.6.3",
Expand Down

0 comments on commit e49aa8d

Please sign in to comment.