-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e5086e4
commit 887cdaa
Showing
15 changed files
with
5,888 additions
and
1,364 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { pascalCase } from 'pascal-case' | ||
import replace from '@rollup/plugin-replace' | ||
import { nodeResolve } from '@rollup/plugin-node-resolve' | ||
import commonjs from '@rollup/plugin-commonjs' | ||
import vue from 'rollup-plugin-vue' | ||
import filesize from 'rollup-plugin-filesize' | ||
import pkg from '../package.json' | ||
|
||
const globals = { | ||
// Provide global variable names to replace your external imports | ||
// eg. jquery: '$' | ||
vue: 'Vue', | ||
} | ||
|
||
const config = { | ||
input: 'src/index.js', | ||
output: { | ||
compact: true, | ||
name: pascalCase(pkg.name), | ||
file: pkg.main, | ||
format: 'cjs', | ||
exports: 'named', | ||
globals, | ||
}, | ||
plugins: [ | ||
replace({ | ||
'process.env.NODE_ENV': JSON.stringify('production'), | ||
'process.env.ES_BUILD': JSON.stringify('false'), | ||
}), | ||
nodeResolve(), | ||
commonjs(), | ||
vue({ css: true, template: { optimizeSSR: true } }), | ||
filesize(), | ||
], | ||
} | ||
|
||
export default config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,28 @@ | ||
import { writeFileSync } from 'fs'; | ||
import vue from 'rollup-plugin-vue'; | ||
import css from 'rollup-plugin-css-only'; | ||
import filesize from 'rollup-plugin-filesize'; | ||
import CleanCSS from 'clean-css'; | ||
import base from './rollup.config.base'; | ||
import pkg from '../package.json'; | ||
import replace from '@rollup/plugin-replace' | ||
import { nodeResolve } from '@rollup/plugin-node-resolve' | ||
import commonjs from '@rollup/plugin-commonjs' | ||
import vue from 'rollup-plugin-vue' | ||
import filesize from 'rollup-plugin-filesize' | ||
import pkg from '../package.json' | ||
|
||
const config = Object.assign({}, base, { | ||
const config = { | ||
input: 'src/index.js', | ||
output: { | ||
name: 'vue-clock', | ||
name: pkg.name, | ||
file: pkg.module, | ||
format: 'es', | ||
format: 'esm', | ||
exports: 'named', | ||
}, | ||
}); | ||
plugins: [ | ||
replace({ | ||
'process.env.NODE_ENV': JSON.stringify('production'), | ||
'process.env.ES_BUILD': JSON.stringify('true'), | ||
}), | ||
nodeResolve(), | ||
commonjs(), | ||
vue({ css: true }), | ||
filesize(), | ||
], | ||
} | ||
|
||
config.plugins.push(vue({ template: { optimizeSSR: true }, css: false })); | ||
config.plugins.push( | ||
css({ | ||
output: function(styles) { | ||
writeFileSync( | ||
'dist/vue-clock.esm.css', | ||
new CleanCSS().minify(styles).styles | ||
); | ||
}, | ||
}) | ||
); | ||
config.plugins.push(filesize()); | ||
|
||
export default config; | ||
export default config |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { pascalCase } from 'pascal-case' | ||
import replace from '@rollup/plugin-replace' | ||
import { nodeResolve } from '@rollup/plugin-node-resolve' | ||
import commonjs from '@rollup/plugin-commonjs' | ||
import vue from 'rollup-plugin-vue' | ||
import filesize from 'rollup-plugin-filesize' | ||
import pkg from '../package.json' | ||
|
||
const globals = { | ||
// Provide global variable names to replace your external imports | ||
// eg. jquery: '$' | ||
vue: 'Vue', | ||
} | ||
|
||
const config = { | ||
input: 'src/index.js', | ||
output: { | ||
compact: true, | ||
name: pascalCase(pkg.name), | ||
file: pkg.unpkg, | ||
format: 'iife', | ||
exports: 'named', | ||
globals, | ||
}, | ||
plugins: [ | ||
replace({ | ||
'process.env.NODE_ENV': JSON.stringify('production'), | ||
'process.env.ES_BUILD': JSON.stringify('false'), | ||
}), | ||
nodeResolve(), | ||
commonjs(), | ||
vue({ css: true }), | ||
filesize(), | ||
], | ||
} | ||
|
||
export default config |
Oops, something went wrong.