Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5e160ef

Browse files
author
“sunpt”
committed
vue-typescript-element-ui
0 parents  commit5e160ef

35 files changed

+1172
-0
lines changed

‎.babelrc‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
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": [
12+
"transform-runtime",
13+
"transform-decorators-legacy",
14+
"transform-class-properties",
15+
["component", [
16+
{
17+
"libraryName":"element-ui",
18+
"styleLibraryName":"theme-default"
19+
}
20+
]]
21+
],
22+
"env": {
23+
"test": {
24+
"presets": ["env","stage-2"],
25+
"plugins": ["istanbul"]
26+
}
27+
}
28+
}

‎.editorconfig‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root =true
2+
3+
[*]
4+
charset =utf-8
5+
indent_style =space
6+
indent_size =2
7+
end_of_line =lf
8+
insert_final_newline =true
9+
trim_trailing_whitespace =true

‎.eslintignore‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
build/*.js
2+
config/*.js

‎.eslintrc.js‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// http://eslint.org/docs/user-guide/configuring
2+
3+
module.exports={
4+
root:true,
5+
parser:'babel-eslint',
6+
parserOptions:{
7+
sourceType:'module'
8+
},
9+
env:{
10+
browser:true,
11+
},
12+
// https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style
13+
extends:'standard',
14+
// required to lint *.vue files
15+
plugins:[
16+
'html'
17+
],
18+
// add your custom rules here
19+
'rules':{
20+
// allow paren-less arrow functions
21+
'arrow-parens':0,
22+
// allow async-await
23+
'generator-star-spacing':0,
24+
// allow debugger during development
25+
'no-debugger':process.env.NODE_ENV==='production' ?2 :0
26+
}
27+
}

‎.gitignore‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.DS_Store
2+
node_modules/
3+
dist/
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
8+
# Editor directories and files
9+
.idea
10+
*.suo
11+
*.ntvs*
12+
*.njsproj
13+
*.sln

‎.postcssrc.js‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
module.exports={
3+
"plugins":{
4+
"autoprefixer":{}
5+
}
6+
}

‎README.md‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#vue-typescript-element-ui
2+
3+
>vue-typescript-element-ui with Typescript and element-ui in Vue
4+
5+
##Build Setup
6+
7+
```bash
8+
# install dependencies
9+
npm install
10+
11+
# serve with hot reload at localhost:8080
12+
npm run dev
13+
14+
# build for production with minification
15+
npm run build
16+
17+
# build for production and view the bundle analyzer report
18+
npm run build --report

‎build/build.js‎

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
require('./check-versions')()
2+
3+
process.env.NODE_ENV='production'
4+
5+
varora=require('ora')
6+
varrm=require('rimraf')
7+
varpath=require('path')
8+
varchalk=require('chalk')
9+
varwebpack=require('webpack')
10+
varconfig=require('../config')
11+
varwebpackConfig=require('./webpack.prod.conf')
12+
13+
varspinner=ora('building for production...')
14+
spinner.start()
15+
16+
rm(path.join(config.build.assetsRoot,config.build.assetsSubDirectory),err=>{
17+
if(err)throwerr
18+
webpack(webpackConfig,function(err,stats){
19+
spinner.stop()
20+
if(err)throwerr
21+
process.stdout.write(stats.toString({
22+
colors:true,
23+
modules:false,
24+
children:false,
25+
chunks:false,
26+
chunkModules:false
27+
})+'\n\n')
28+
29+
console.log(chalk.cyan(' Build complete.\n'))
30+
console.log(chalk.yellow(
31+
' Tip: built files are meant to be served over an HTTP server.\n'+
32+
' Opening index.html over file:// won\'t work.\n'
33+
))
34+
})
35+
})

‎build/check-versions.js‎

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
varchalk=require('chalk')
2+
varsemver=require('semver')
3+
varpackageConfig=require('../package.json')
4+
varshell=require('shelljs')
5+
functionexec(cmd){
6+
returnrequire('child_process').execSync(cmd).toString().trim()
7+
}
8+
9+
varversionRequirements=[
10+
{
11+
name:'node',
12+
currentVersion:semver.clean(process.version),
13+
versionRequirement:packageConfig.engines.node
14+
},
15+
]
16+
17+
if(shell.which('npm')){
18+
versionRequirements.push({
19+
name:'npm',
20+
currentVersion:exec('npm --version'),
21+
versionRequirement:packageConfig.engines.npm
22+
})
23+
}
24+
25+
module.exports=function(){
26+
varwarnings=[]
27+
for(vari=0;i<versionRequirements.length;i++){
28+
varmod=versionRequirements[i]
29+
if(!semver.satisfies(mod.currentVersion,mod.versionRequirement)){
30+
warnings.push(mod.name+': '+
31+
chalk.red(mod.currentVersion)+' should be '+
32+
chalk.green(mod.versionRequirement)
33+
)
34+
}
35+
}
36+
37+
if(warnings.length){
38+
console.log('')
39+
console.log(chalk.yellow('To use this template, you must update following to modules:'))
40+
console.log()
41+
for(vari=0;i<warnings.length;i++){
42+
varwarning=warnings[i]
43+
console.log(' '+warning)
44+
}
45+
console.log()
46+
process.exit(1)
47+
}
48+
}

‎build/dev-client.js‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/* eslint-disable */
2+
require('eventsource-polyfill')
3+
varhotClient=require('webpack-hot-middleware/client?noInfo=true&reload=true')
4+
5+
hotClient.subscribe(function(event){
6+
if(event.action==='reload'){
7+
window.location.reload()
8+
}
9+
})

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp