forked from ElemeFE/mint-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
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
5367203
commit 4885ab3
Showing
49 changed files
with
295 additions
and
206 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
release.sh | ||
node_modules | ||
lib |
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 |
---|---|---|
|
@@ -6,4 +6,5 @@ packages/**/lib | |
lib/* | ||
!lib/index.js | ||
!lib/style.css | ||
node_modules | ||
node_modules | ||
example/dist |
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,5 @@ | ||
sudo: false | ||
language: node_js | ||
node_js: | ||
- "5" | ||
script: make dist |
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 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 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 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 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,24 @@ | ||
var Components = require('../components.json'); | ||
var path = require('path'); | ||
var externals = {}; | ||
|
||
Object.keys(Components).forEach(function(key) { | ||
externals[`mint-ui/packages/${key}/index.js`] = `mint-ui/lib/${key}`; | ||
externals[`mint-ui/packages/${key}/style.css`] = `mint-ui/lib/${key}/style.css`; | ||
}); | ||
|
||
exports.externals = Object.assign({ | ||
vue: { | ||
root: 'Vue', | ||
commonjs: 'vue', | ||
commonjs2: 'vue', | ||
amd: 'vue' | ||
} | ||
}, externals); | ||
|
||
exports.alias = { | ||
'mint-ui': path.join(__dirname, '..'), | ||
'src': path.join(__dirname, '../src') | ||
}; | ||
|
||
exports.jsexclude = /node_modules|lib/; |
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,28 @@ | ||
var cooking = require('cooking'); | ||
var webpack = require('webpack'); | ||
var config = require('./config'); | ||
|
||
cooking.set({ | ||
entry: './src/index.js', | ||
dist: './lib/', | ||
clean: false, | ||
template: false, | ||
format: 'cjs', | ||
minimize: false, | ||
moduleName: 'MINT', | ||
extractCSS: 'style.css', | ||
extends: ['vue2', 'saladcss', 'buble'], | ||
alias: config.alias, | ||
externals: config.externals | ||
}); | ||
|
||
cooking.remove('output.publicPath'); | ||
cooking.add('output.filename', 'mint-ui.common.js'); | ||
cooking.add('loader.js.exclude', config.jsexclude); | ||
cooking.add('loader.vue.exclude', config.jsexclude); | ||
|
||
cooking.add('plugins.Define', new webpack.DefinePlugin({ | ||
'process.env.NODE_ENV': JSON.stringify('component') | ||
})); | ||
|
||
module.exports = cooking.resolve(); |
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,28 @@ | ||
var cooking = require('cooking'); | ||
var Components = require('../components.json'); | ||
var webpack = require('webpack'); | ||
var config = require('./config'); | ||
|
||
cooking.set({ | ||
entry: Components, | ||
dist: './lib/', | ||
clean: false, | ||
template: false, | ||
minimize: false, | ||
format: 'cjs', | ||
extractCSS: '[name]/style.css', | ||
extends: ['vue2', 'saladcss', 'buble'], | ||
alias: config.alias, | ||
externals: config.externals | ||
}); | ||
|
||
cooking.remove('output.publicPath'); | ||
cooking.add('output.filename', '[name]/index.js'); | ||
cooking.add('loader.js.exclude', config.jsexclude); | ||
cooking.add('loader.vue.exclude', config.jsexclude); | ||
|
||
cooking.add('plugins.Define', new webpack.DefinePlugin({ | ||
'process.env.NODE_ENV': JSON.stringify('component') | ||
})); | ||
|
||
module.exports = cooking.resolve(); |
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,22 @@ | ||
var cooking = require('cooking'); | ||
var config = require('./config'); | ||
|
||
cooking.set({ | ||
entry: './src/index.js', | ||
dist: './lib/', | ||
clean: false, | ||
template: false, | ||
format: 'umd', | ||
moduleName: 'MINT', | ||
extractCSS: 'style.min.css', | ||
extends: ['vue2', 'saladcss', 'buble'], | ||
alias: config.alias, | ||
externals: { vue: config.externals.vue } | ||
}); | ||
|
||
cooking.remove('output.publicPath'); | ||
cooking.add('output.filename', 'index.js'); | ||
cooking.add('loader.js.exclude', config.jsexclude); | ||
cooking.add('loader.vue.exclude', config.jsexclude); | ||
|
||
module.exports = cooking.resolve(); |
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
Oops, something went wrong.