Skip to content
This repository has been archived by the owner on Dec 24, 2020. It is now read-only.

Commit

Permalink
Move build script to a yarn command, prettify JSON output.
Browse files Browse the repository at this point in the history
  • Loading branch information
connorshea committed Jul 2, 2018
1 parent 8bbe470 commit 7686c86
Show file tree
Hide file tree
Showing 5 changed files with 441,828 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ install:
- bundle install
- nvm install 9
- nvm use 9
- yarn install
- yarn install --frozen-lockfile
- yarn list
before_script:
- cp config/database.yml.travis config/database.yml
Expand All @@ -28,7 +28,7 @@ script:
- bundle exec rake db:seed
- bundle exec rake test
- bundle exec rake test:system
- node lib/build.js
- yarn run build
- git diff --exit-code --quiet public/data.json
- bundle exec rake check:check_mdn_bcd_version
- bundle exec rake check:check_json
Expand Down
2 changes: 1 addition & 1 deletion lib/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ fs.writeFile(
'public',
'data.json'
),
JSON.stringify(payload),
JSON.stringify(payload, null, 2),
err => {
if (err) {
console.error(err)
Expand Down
6 changes: 3 additions & 3 deletions lib/tasks/update.rake
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ namespace :update do
puts "Continuing..."

puts ""
puts "Regenerating 'public/data.json' with 'node lib/build.js'."
puts "node lib/build.js"
system('node lib/build.js') or exit
puts "Regenerating 'public/data.json' with 'yarn run build'."
puts "yarn run build"
system('yarn run build') or exit
puts "Continuing..."

puts ""
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@
"dependencies": {
"chart.js": "^2.7.2",
"mdn-browser-compat-data": "0.0.39"
},
"scripts": {
"build": "node ./lib/build.js"
}
}
441,820 changes: 441,819 additions & 1 deletion public/data.json

Large diffs are not rendered by default.

0 comments on commit 7686c86

Please sign in to comment.