mirror of https://github.com/ElemeFE/element
Add 'make play'
parent
21d3cb4c82
commit
dad5edad74
3
Makefile
3
Makefile
|
@ -14,6 +14,9 @@ install-cn:
|
|||
dev:
|
||||
npm run dev
|
||||
|
||||
play:
|
||||
npm run dev:play
|
||||
|
||||
new:
|
||||
node build/bin/new.js $(filter-out $@,$(MAKECMDGOALS))
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ var md = require('markdown-it')();
|
|||
var striptags = require('./strip-tags');
|
||||
var slugify = require('transliteration').slugify;
|
||||
var isProd = process.env.NODE_ENV === 'production';
|
||||
var isPlay = !!process.env.PLAY_ENV;
|
||||
|
||||
function convert(str) {
|
||||
str = str.replace(/(&#x)(\w{4});/gi, function($0) {
|
||||
|
@ -16,7 +17,7 @@ cooking.set({
|
|||
entry: isProd ? {
|
||||
docs: './examples/entry.js',
|
||||
'element-ui': './src/index.js'
|
||||
} : './examples/entry.js',
|
||||
} : (isPlay ? './examples/play.js' : './examples/entry.js'),
|
||||
dist: './examples/element-ui/',
|
||||
template: [
|
||||
{
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
import Vue from 'vue';
|
||||
import Element from 'main/index.js';
|
||||
import App from './play/index.vue';
|
||||
import 'packages/theme-default/src/index.css';
|
||||
|
||||
Vue.use(Element);
|
||||
|
||||
new Vue({ // eslint-disable-line
|
||||
render: h => h(App)
|
||||
}).$mount('#app');
|
|
@ -1,6 +1,3 @@
|
|||
<style scoped>
|
||||
</style>
|
||||
|
||||
<template>
|
||||
<div style="margin: 20px;">
|
||||
<!-- Write your component in component.vue -->
|
||||
|
|
11
package.json
11
package.json
|
@ -14,18 +14,19 @@
|
|||
"build:theme": "node build/bin/gen-cssfile && gulp build --gulpfile packages/theme-default/gulpfile.js && cp-cli packages/theme-default/lib lib/theme-default",
|
||||
"build:utils": "cross-env BABEL_ENV=utils babel src --out-dir lib --ignore src/index.js",
|
||||
"clean": "rimraf lib && rimraf packages/*/lib && rimraf test/**/coverage && lerna clean --yes",
|
||||
"deploy:dev": "npm run build:file && CI_ENV=/dev/ cooking build -c build/cooking.demo.js",
|
||||
"deploy:build": "npm run build:file && cooking build -c build/cooking.demo.js -p && echo element.eleme.io>>examples/element-ui/CNAME",
|
||||
"deploy": "npm run deploy:build && gh-pages -d examples/element-ui --remote eleme && del examples/element-ui",
|
||||
"deploy:build": "npm run build:file && cooking build -c build/cooking.demo.js -p && echo element.eleme.io>>examples/element-ui/CNAME",
|
||||
"deploy:dev": "npm run build:file && CI_ENV=/dev/ cooking build -c build/cooking.demo.js",
|
||||
"dev": "npm run bootstrap && npm run build:file && cooking watch -c build/cooking.demo.js -p",
|
||||
"dev:play": "npm run build:file && cross-env PLAY_ENV=true cooking watch -c build/cooking.demo.js -p",
|
||||
"dist": "npm run clean && npm run build:file && npm run lint && cooking build -c build/cooking.conf.js,build/cooking.common.js,build/cooking.component.js -p && npm run build:utils && npm run build:theme",
|
||||
"dist:all": "node build/bin/build-all.js && npm run build:theme",
|
||||
"i18n": "node build/bin/i18n.js",
|
||||
"lint": "eslint src/**/* test/**/* packages/**/*.{js,vue} build/**/* --quiet",
|
||||
"pub": "git checkout master && git pull eleme master --rebase && sh build/release.sh",
|
||||
"pub:all": "npm run dist:all && lerna publish",
|
||||
"test": "npm run lint && CI_ENV=/dev/ karma start test/unit/karma.conf.js --single-run",
|
||||
"test:watch": "karma start test/unit/karma.conf.js",
|
||||
"i18n": "node build/bin/i18n.js"
|
||||
"test:watch": "karma start test/unit/karma.conf.js"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -62,7 +63,7 @@
|
|||
"babel-preset-es2015": "^6.14.0",
|
||||
"chai": "^3.5.0",
|
||||
"cheerio": "^0.18.0",
|
||||
"cooking": "^1.1.0",
|
||||
"cooking": "^1.2.0",
|
||||
"cooking-lint": "^0.1.3",
|
||||
"cooking-vue2": "^0.1.4",
|
||||
"coveralls": "^2.11.14",
|
||||
|
|
Loading…
Reference in New Issue