Browse Source

chore: store artifacts on circleci

pull/2425/head
Yoshiya Hinosawa 7 years ago
parent
commit
aa5d69c31c
  1. 3
      .circleci/config.yml
  2. 12
      .gitignore
  3. 1
      htdocs/css/c3.css
  4. 1
      htdocs/js/c3.js
  5. 1
      htdocs/js/c3.min.js
  6. 11
      package.json
  7. 2
      rollup.config.js

3
.circleci/config.yml

@ -18,6 +18,9 @@ jobs:
- ./node_modules - ./node_modules
- run: npm test - run: npm test
- run: npm run codecov - run: npm run codecov
- store_artifacts:
path: htdocs
destination: htdocs
publish-docs: publish-docs:
docker: docker:
- image: circleci/ruby:2.4-node - image: circleci/ruby:2.4-node

12
.gitignore vendored

@ -4,8 +4,18 @@ bower_components
d3.js d3.js
d3.min.js d3.min.js
components components
build
# build
/htdocs/js/c3.js
/htdocs/js/c3.min.js
/htdocs/css/c3.css
/htdocs/css/c3.min.css
/build
# sass
.sass-cache .sass-cache
# jetbrains
.idea/ .idea/
# coverage report # coverage report

1
htdocs/css/c3.css

@ -1 +0,0 @@
../../c3.css

1
htdocs/js/c3.js

@ -1 +0,0 @@
../../c3.js

1
htdocs/js/c3.min.js vendored

@ -1 +0,0 @@
../../c3.min.js

11
package.json

@ -10,10 +10,10 @@
"build": "npm run build:js && npm run build:css", "build": "npm run build:js && npm run build:css",
"build:js": "npm run build:js:rollup && npm run build:js:uglify", "build:js": "npm run build:js:rollup && npm run build:js:uglify",
"build:js:rollup": "rollup -c", "build:js:rollup": "rollup -c",
"build:js:uglify": "uglifyjs c3.js --compress --mangle --comments -o c3.min.js", "build:js:uglify": "uglifyjs htdocs/js/c3.js --compress --mangle --comments -o htdocs/js/c3.min.js",
"build:css": "npm run build:css:sass && npm run build:css:min", "build:css": "npm run build:css:sass && npm run build:css:min",
"build:css:sass": "node-sass src/scss/main.scss > c3.css", "build:css:sass": "node-sass src/scss/main.scss > htdocs/css/c3.css",
"build:css:min": "cleancss -o c3.min.css c3.css", "build:css:min": "cleancss -o htdocs/css/c3.min.css htdocs/css/c3.css",
"build:docs": "bundle exec middleman build", "build:docs": "bundle exec middleman build",
"publish-docs": "npm run build:docs && gh-pages -d build -m \"chore: update gh-pages [skip ci]\"", "publish-docs": "npm run build:docs && gh-pages -d build -m \"chore: update gh-pages [skip ci]\"",
"watch": "nodemon -e js,scss --watch src -x 'npm run build:js:rollup && npm run build:css:sass'", "watch": "nodemon -e js,scss --watch src -x 'npm run build:js:rollup && npm run build:css:sass'",
@ -22,8 +22,9 @@
"watch:docs": "bundle exec middleman", "watch:docs": "bundle exec middleman",
"test:only": "karma start karma.conf.js", "test:only": "karma start karma.conf.js",
"test": "npm run build && npm run lint && karma start karma.conf.js", "test": "npm run build && npm run lint && karma start karma.conf.js",
"dist": "npm run build && npm run copy-to-docs", "dist": "npm run build && npm run copy-to-root && npm run copy-to-docs",
"copy-to-docs": "cp c3.min.js docs/js/ && cp c3.css docs/css/", "copy-to-docs": "cp htdocs/js/c3.* docs/js/ && cp htdocs/css/c3.* docs/css/",
"copy-to-root": "cp htdocs/{css,js}/c3.* ./",
"codecov": "codecov" "codecov": "codecov"
}, },
"repository": { "repository": {

2
rollup.config.js

@ -4,7 +4,7 @@ import pkg from './package.json'
export default { export default {
input: 'src/index.js', input: 'src/index.js',
output: { output: {
file: 'c3.js', file: 'htdocs/js/c3.js',
name: 'c3', name: 'c3',
format: 'umd', format: 'umd',
banner: `/* @license C3.js v${pkg.version} | (c) C3 Team and other contributors | http://c3js.org/ */`, banner: `/* @license C3.js v${pkg.version} | (c) C3 Team and other contributors | http://c3js.org/ */`,

Loading…
Cancel
Save