From aa5d69c31c2e49f44792ea26141a38716264490f Mon Sep 17 00:00:00 2001 From: Yoshiya Hinosawa Date: Mon, 23 Jul 2018 20:03:09 +0900 Subject: [PATCH] chore: store artifacts on circleci --- .circleci/config.yml | 3 +++ .gitignore | 12 +++++++++++- htdocs/css/c3.css | 1 - htdocs/js/c3.js | 1 - htdocs/js/c3.min.js | 1 - package.json | 11 ++++++----- rollup.config.js | 2 +- 7 files changed, 21 insertions(+), 10 deletions(-) delete mode 120000 htdocs/css/c3.css delete mode 120000 htdocs/js/c3.js delete mode 120000 htdocs/js/c3.min.js diff --git a/.circleci/config.yml b/.circleci/config.yml index 924a800..8b64a46 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -18,6 +18,9 @@ jobs: - ./node_modules - run: npm test - run: npm run codecov + - store_artifacts: + path: htdocs + destination: htdocs publish-docs: docker: - image: circleci/ruby:2.4-node diff --git a/.gitignore b/.gitignore index a3f800e..dfafee4 100644 --- a/.gitignore +++ b/.gitignore @@ -4,8 +4,18 @@ bower_components d3.js d3.min.js 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 + +# jetbrains .idea/ # coverage report diff --git a/htdocs/css/c3.css b/htdocs/css/c3.css deleted file mode 120000 index 4052640..0000000 --- a/htdocs/css/c3.css +++ /dev/null @@ -1 +0,0 @@ -../../c3.css \ No newline at end of file diff --git a/htdocs/js/c3.js b/htdocs/js/c3.js deleted file mode 120000 index 644b352..0000000 --- a/htdocs/js/c3.js +++ /dev/null @@ -1 +0,0 @@ -../../c3.js \ No newline at end of file diff --git a/htdocs/js/c3.min.js b/htdocs/js/c3.min.js deleted file mode 120000 index a221dd2..0000000 --- a/htdocs/js/c3.min.js +++ /dev/null @@ -1 +0,0 @@ -../../c3.min.js \ No newline at end of file diff --git a/package.json b/package.json index 06c1fcf..d4f5ed6 100644 --- a/package.json +++ b/package.json @@ -10,10 +10,10 @@ "build": "npm run build:js && npm run build:css", "build:js": "npm run build:js:rollup && npm run build:js:uglify", "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:sass": "node-sass src/scss/main.scss > c3.css", - "build:css:min": "cleancss -o c3.min.css c3.css", + "build:css:sass": "node-sass src/scss/main.scss > htdocs/css/c3.css", + "build:css:min": "cleancss -o htdocs/css/c3.min.css htdocs/css/c3.css", "build:docs": "bundle exec middleman build", "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'", @@ -22,8 +22,9 @@ "watch:docs": "bundle exec middleman", "test:only": "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", - "copy-to-docs": "cp c3.min.js docs/js/ && cp c3.css docs/css/", + "dist": "npm run build && npm run copy-to-root && npm run copy-to-docs", + "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" }, "repository": { diff --git a/rollup.config.js b/rollup.config.js index 598247f..e3a4634 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -4,7 +4,7 @@ import pkg from './package.json' export default { input: 'src/index.js', output: { - file: 'c3.js', + file: 'htdocs/js/c3.js', name: 'c3', format: 'umd', banner: `/* @license C3.js v${pkg.version} | (c) C3 Team and other contributors | http://c3js.org/ */`,