Skip to content

Commit

Permalink
Flatten script/
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Nov 5, 2016
1 parent a8d4871 commit 0b59623
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions script/generate.js → build.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@

/* Dependencies. */
var fs = require('fs');
var path = require('path');
var toJSON = require('plain-text-data-to-json');

/* Read. */
var doc = fs.readFileSync(path.join(__dirname, '..', 'data.txt'), 'utf8');
var doc = fs.readFileSync('data.txt', 'utf8');

/* Transform. */
var data = JSON.stringify(toJSON(doc), null, 2) + '\n';

/* Write. */
fs.writeFileSync(path.join(__dirname, '..', 'index.json'), data);
fs.writeFileSync('index.json', data);
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
},
"scripts": {
"build-md": "remark . --quiet --frail",
"build-generate": "node script/generate.js",
"build-generate": "node build",
"build-bundle": "browserify index.json --bare -s fillers > fillers.js",
"build-mangle": "esmangle fillers.js > fillers.min.js",
"build": "npm run build-md && npm run build-generate && npm run build-bundle && npm run build-mangle",
Expand Down

0 comments on commit 0b59623

Please sign in to comment.