Skip to content

Commit

Permalink
feat: init & done
Browse files Browse the repository at this point in the history
  • Loading branch information
afeiship committed Feb 20, 2019
0 parents commit 95f5e39
Show file tree
Hide file tree
Showing 20 changed files with 1,307 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
root = true

[*]
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
node_modules
bower_components
coverage
npm-debug.log
yarn.lock
package-lock.json
.DS_Store
.idea
.vscode
8 changes: 8 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.idea
.DS_Store
**/npm-debug.log
**/node_modules
test
src
build
gulpfile.js
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sass_binary_site=https://npm.taobao.org/mirrors/node-sass/
36 changes: 36 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"trailingComma": "none",
"arrowParens": "always",
"printWidth": 100,
"bracketSpacing": true,
"jsxBracketSameLine": true,
"tabWidth": 2,
"semi": true,
"singleQuote": true,
"overrides": [
{
"files": "*.scss",
"options": {
"trailingComma": "none",
"tabWidth": 2,
"parser": "scss"
}
},
{
"files": "*.json",
"options": {
"trailingComma": "none",
"tabWidth": 2,
"parser": "json"
}
},
{
"files": "*.md",
"options": {
"trailingComma": "none",
"tabWidth": 2,
"parser": "json"
}
}
]
}
21 changes: 21 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2016 afei <1290657123@qq.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# next-const-adjective
> A lot of adjective
## install:
```bash
npm install -S afeiship/next-const-adjective --registry=https://registry.npm.taobao.org
```

## usage:
```js
//DOCS here!
```
28 changes: 28 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "next-const-adjective",
"version": "0.0.1",
"description": "A lot of adjective",
"main": "dist/next-const-adjective.js",
"authors": [
"afei"
],
"license": "MIT",
"keywords": [
"next"
],
"homepage": "https://github.com/afeiship/next-const-adjective",
"moduleType": [
"amd"
],
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests",
"build",
"src",
"gulp",
"gulpfile.js"
]
}
15 changes: 15 additions & 0 deletions build/build.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
(function() {

'use strict';

const gulp = require('gulp');
const config = require('./config');

gulp.task('build', ['clean'], function() {
// console.log('Your task goes here!');
gulp.start(['scripts']);
});



}());
16 changes: 16 additions & 0 deletions build/clean.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
(function() {

'use strict';

const gulp = require('gulp');
const config = require('./config');
const $ = require('gulp-load-plugins')({
pattern: ['gulp-*', 'gulp.*', 'del']
});

//clean
gulp.task('clean', function() {
return $.del('dist');
});

}());
26 changes: 26 additions & 0 deletions build/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
(function () {

'use strict';

const rootPath = process.cwd();
const gulp = require('gulp');


module.exports = {
path: {
root: rootPath,
src: rootPath + '/src',
dist: rootPath + '/dist',
gulp: rootPath + '/gulp'
},
sassOptions: {
normal: {
outputStyle: 'expanded' /* nested | expanded | compact | compressed */
},
minify: {
outputStyle: 'compressed'
}
}
};

}());
23 changes: 23 additions & 0 deletions build/scripts.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
(function() {

'use strict';

const gulp = require('gulp');
const config = require('./config');
const $ = require('gulp-load-plugins')({
pattern: ['gulp-*', 'gulp.*', 'del']
});

gulp.task('scripts', function () {
return gulp.src('src/*.js')
.pipe(gulp.dest('dist'))
.pipe($.size({title: '[ default size ]:'}))
.pipe($.uglify())
.pipe($.rename({
extname: '.min.js'
}))
.pipe(gulp.dest('dist'))
.pipe($.size({title: '[ minimize size ]:'}));
});

}());
21 changes: 21 additions & 0 deletions build/version.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
(function () {

'use strict';

var gulp = require('gulp');
var $ = require('gulp-load-plugins')({
pattern: ['gulp-*', 'gulp.*', 'del']
});

/**
* @thanks to:
* http://www.jianshu.com/p/d616d3bf391f
*/

gulp.task('bump', function () {
gulp.src(['./*.json'])
.pipe($.bump())
.pipe(gulp.dest('./'));
});

}());
Loading

0 comments on commit 95f5e39

Please sign in to comment.