Skip to content

Commit 9dbe24f

Browse files
committed
Refactor src and demo folders
- create / move folders - add Rollup as bundle builder - update package.json for NPM - prepare for Netlify
1 parent 01771dc commit 9dbe24f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+15889
-11342
lines changed

.babelrc

+12-11
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
{
2-
"presets": [
3-
["env", {
4-
"modules": false,
5-
"targets": {
6-
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
7-
}
8-
}],
9-
"stage-2"
10-
],
11-
"plugins": ["transform-vue-jsx", "transform-runtime"]
12-
}
2+
"env": {
3+
"testing": {
4+
"presets":[
5+
["env", { "modules": false }],
6+
"react",
7+
],
8+
"plugins": [
9+
"transform-es2015-modules-commonjs",
10+
]
11+
}
12+
}
13+
}

.eslintignore

-5
This file was deleted.

.eslintrc.js

-31
This file was deleted.

.gitignore

+9-7
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
.DS_Store
22
node_modules/
3-
/dist/
4-
npm-debug.log*
5-
yarn-debug.log*
6-
yarn-error.log*
3+
dist/
4+
npm-debug.log
5+
yarn-error.log
6+
7+
build/.rpt2_cache
8+
tests/coverage
9+
/coverage
10+
711

812
# Editor directories and files
9-
.idea
1013
.vscode
14+
.idea
1115
*.suo
1216
*.ntvs*
1317
*.njsproj
1418
*.sln
15-
16-
vue-smooth-dnd/dist

.postcssrc.js

-10
This file was deleted.

build/banner.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Bundle of: <%= pkg.name %>
2+
Generated: <%= moment().format('YYYY-MM-DD') %>
3+
Version: <%= pkg.version %>

build/build.js

-41
This file was deleted.

build/check-versions.js

-54
This file was deleted.

build/logo.png

-6.69 KB
Binary file not shown.

build/rollup.js

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
// ------------------------------------------------------------------------------------------
2+
// setup
3+
// ------------------------------------------------------------------------------------------
4+
5+
import path from 'path'
6+
import license from 'rollup-plugin-license'
7+
import commonjs from 'rollup-plugin-commonjs'
8+
import uglify from 'rollup-plugin-uglify'
9+
import buble from 'rollup-plugin-buble'
10+
11+
const pkg = require('../package.json')
12+
const external = Object.keys(pkg.dependencies || {})
13+
const name = pkg.name
14+
const className = name.replace(/(^\w|-\w)/g, c => c.replace('-', '').toUpperCase())
15+
16+
function output (ext, format = 'umd') {
17+
return {
18+
name: className,
19+
file: `dist/${name}.${ext}`,
20+
format: format,
21+
exports: 'named',
22+
}
23+
}
24+
25+
// ------------------------------------------------------------------------------------------
26+
// build
27+
// ------------------------------------------------------------------------------------------
28+
29+
const umd = {
30+
input: 'src/main.js',
31+
external: external,
32+
output: output('js'),
33+
plugins: [
34+
license({
35+
banner: {
36+
file: path.join(__dirname, 'banner.txt')
37+
},
38+
}),
39+
commonjs(),
40+
buble()
41+
]
42+
}
43+
44+
const min = Object.assign({}, umd, {
45+
output: output('min.js'),
46+
plugins: [...umd.plugins, uglify()]
47+
})
48+
49+
const es = Object.assign({}, umd, {
50+
output: output('esm.js', 'es')
51+
})
52+
53+
export default [umd, min, es]

build/utils.js

-101
This file was deleted.

build/vue-loader.conf.js

-22
This file was deleted.

0 commit comments

Comments
 (0)