Skip to content

Commit

Permalink
build: change to new build system
Browse files Browse the repository at this point in the history
  • Loading branch information
Scrum committed Jun 20, 2019
1 parent 6ffae4e commit 5d36e13
Show file tree
Hide file tree
Showing 2 changed files with 97 additions and 74 deletions.
135 changes: 61 additions & 74 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,14 @@
"node": ">=4"
},
"scripts": {
"version": "conventional-changelog -i changelog.md -s -r 0 && git commit -am \"build: update changelog\"",
"version": "conventional-changelog -i changelog.md -s -r 0 && git add changelog.md && git commit -m \"build: update changelog\"",
"prepare": "npm run build",
"build": "rimraf lib && babel src -d lib",
"test": "echo issue #3"
"build": "rimraf lib && rollup -c",
"coverage": "nyc report --reporter=text-lcov | coveralls",
"test": "nyc ava",
"lint": "eslint {src,test}/*.js *.md --fix",
"pretest": "clinton && npm run lint",
"start": "http-server docs"
},
"files": [
"lib"
Expand All @@ -32,105 +36,88 @@
"vuejs"
],
"devDependencies": {
"@babel/cli": "^7.2.3",
"@babel/core": "^7.2.2",
"@babel/preset-env": "^7.3.1",
"@babel/register": "^7.0.0",
"@commitlint/cli": "^7.5.0",
"@commitlint/config-angular": "^7.5.0",
"babel-eslint": "^10.0.1",
"babel-preset-minify": "^0.5.0",
"@babel/core": "^7.4.5",
"@babel/preset-env": "^7.4.5",
"@babel/register": "^7.4.4",
"@commitlint/cli": "^8.0.0",
"@commitlint/config-angular": "^7.3.1",
"@vue/test-utils": "^1.0.0-beta.29",
"ava": "*",
"babel-eslint": "^10.0.2",
"browser-env": "^3.2.6",
"clinton": "^0.14.0",
"conventional-changelog-cli": "^2.0.11",
"eslint": "^5.13.0",
"conventional-changelog-cli": "^2.0.12",
"coveralls": "^3.0.3",
"eslint": "^5.16.0",
"eslint-config-vue": "^2.0.2",
"eslint-config-xo": "^0.26.0",
"eslint-config-xo-space": "^0.21.0",
"eslint-plugin-ava": "^5.1.1",
"eslint-plugin-ava": "^7.1.0",
"eslint-plugin-babel": "^5.3.0",
"eslint-plugin-dependencies": "^2.4.0",
"eslint-plugin-html": "^5.0.0",
"eslint-plugin-markdown": "^1.0.0",
"eslint-plugin-unicorn": "^7.1.0",
"eslint-plugin-vue": "^5.1.0",
"husky": "^1.3.1",
"lint-staged": "^8.1.3",
"rimraf": "^2.6.3"
"eslint-plugin-prettier": "^3.0.1",
"eslint-plugin-require-path-exists": "^1.1.5",
"eslint-plugin-unicorn": "^9.1.0",
"eslint-plugin-vue": "^5.2.2",
"http-server": "^0.11.1",
"husky": "^2.3.0",
"lint-staged": "^8.2.1",
"nyc": "^14.1.1",
"prettier": "^1.17.0",
"require-extension-hooks": "^0.3.3",
"require-extension-hooks-babel": "^1.0.0",
"require-extension-hooks-vue": "^3.0.0",
"restricted-input": "^2.0.1",
"rimraf": "^2.6.3",
"rollup": "^1.1.2",
"rollup-plugin-babel": "^4.3.2",
"rollup-plugin-commonjs": "^10.0.0",
"rollup-plugin-node-builtins": "^2.1.2",
"rollup-plugin-node-resolve": "^5.0.0",
"rollup-plugin-terser": "^5.0.0",
"rollup-plugin-vue": "^5.0.0",
"vue": "^2.6.10",
"vue-template-compiler": "^2.6.10"
},
"lint-staged": {
"{src,test}/**/*.{js,html,htm}": "eslint",
"*.md": "eslint"
},
"unpkg": "lib/vue-2-breadcrumbs.js",
"style": "lib/vue-2-breadcrumbs.css",
"husky": {
"hooks": {
"pre-push": "npm t",
"pre-commit": "clinton && lint-staged",
"commit-msg": "commitlint --extends=@commitlint/config-angular -e"
}
},
"lint-staged": {
"{src,test}/*.js": "eslint",
"*.md": "eslint"
},
"ava": {
"files": [
"test/test-*.js"
],
"require": [
"@babel/register"
"./test/helpers/setup.js"
]
},
"babel": {
"presets": [
[
"@babel/preset-env",
{
"targets": {
"ie": 11
},
"modules": "umd"
}
],
[
"minify",
{
"removeUndefined": false,
"mangle": false
}
]
"nyc": {
"extension": [
".js",
".vue"
]
},
"eslintConfig": {
"parser": "babel-eslint",
"plugins": [
"ava",
"unicorn",
"babel",
"markdown"
],
"extends": [
"plugin:unicorn/recommended",
"plugin:ava/recommended",
"xo",
"xo-space"
],
"rules": {
"capitalized-comments": "off"
}
},
"clinton": {
"ignores": [
"test/**",
"tmp/**",
"lib/**",
"dist/**",
"docs/**",
"*.{html,jpg}"
],
"rules": {
"pkg-main": [
"off"
],
"xo": [
"off"
],
"ava": [
"off"
],
"use-travis": [
"off"
]
"pkg-main": "off",
"xo": "off"
}
}
}
36 changes: 36 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import babel from 'rollup-plugin-babel';
// import {terser} from 'rollup-plugin-terser';
import commonjs from 'rollup-plugin-commonjs';
import resolve from 'rollup-plugin-node-resolve';
import builtins from 'rollup-plugin-node-builtins';
import vuePlugin from 'rollup-plugin-vue';

export default {
input: 'src/index.js',
output: [
{
file: 'dist/vue-breadcrumbs.min.js',
format: 'umd',
name: 'VueBreadcrumbs',
exports: 'named'
},
{
file: 'docs/vue-breadcrumbs.min.js',
format: 'umd',
name: 'VueBreadcrumbs',
exports: 'named'
},
{
file: 'lib/index.js',
format: 'esm'
}
],
plugins: [
resolve(),
commonjs(),
builtins(),
babel(),
vuePlugin()
// terser()
]
};

0 comments on commit 5d36e13

Please sign in to comment.