Skip to content

Commit

Permalink
gulp workplace
Browse files Browse the repository at this point in the history
  • Loading branch information
kaskar2008 committed May 14, 2017
1 parent ac1f177 commit 70b071a
Show file tree
Hide file tree
Showing 13 changed files with 141 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": [ "es2015" ]
}
20 changes: 20 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# EditorConfig is awesome: http://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 2

# Matches multiple files with brace expansion notation
# Set default charset
[*.{js,py}]
charset = utf-8

# Tab indentation (no size specified)
[Makefile]
indent_style = space
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Mac.
.DS_STORE

# Node.
node_modules
npm-debug.log
11 changes: 11 additions & 0 deletions classes/Step.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export class Step {
constructor (parent, params) {
this.parent = parent
this.params = params
this._lo = 'lol'
}

get lol () {
return this._lo
}
}
15 changes: 15 additions & 0 deletions classes/StepSystem.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Step } from 'Step'

export class StepSystem {
constructor () {
this._steps = []
}

addStep (params) {
this._steps.push(new Step (this, params))
}

get steps () {
return this._steps
}
}
1 change: 1 addition & 0 deletions dest/Step.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dest/StepSystem.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions example/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { Step } from './classes/Step'
import { StepSystem } from './classes/StepSystem'

const app = new StepSystem()
1 change: 1 addition & 0 deletions example/dist/app.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions example/dist/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<script src="app.js"></script>
</body>
</html>
36 changes: 36 additions & 0 deletions gulpfile.babel.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import gulp from 'gulp'
import babel from 'gulp-babel'
import concat from 'gulp-concat'
import plumber from 'gulp-plumber'
import uglify from 'gulp-uglify'
import browserify from 'gulp-browserify'

export function js_build(){
return gulp.src('classes/**/*.js')
.pipe(babel({
presets: ['es2015']
}))
.pipe(uglify())
.pipe(gulp.dest('./dest'))
}

export function app_build(){
return gulp.src('example/app.js')
.pipe(babel({
presets: ['es2015']
}))
.pipe(browserify({
insertGlobals : true
}))
.pipe(uglify())
.pipe(gulp.dest('./example/dist'))
}

const build = gulp.series(
js_build,
app_build
)

export { build }

export default build
Empty file added index.js
Empty file.
33 changes: 33 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"name": "js-step-system",
"version": "1.0.0",
"description": "",
"main": "index.js",
"directories": {
"example": "example"
},
"devDependencies": {
"babel-preset-es2015": "^6.22.0",
"babel-register": "^6.22.0",
"gulp": "github:gulpjs/gulp#4.0",
"gulp-babel": "^6.1.2",
"gulp-browserify": "^0.5.1",
"gulp-concat": "^2.6.1",
"gulp-plumber": "^1.1.0",
"gulp-uglify": "^2.0.1"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"gulp": "gulp"
},
"repository": {
"type": "git",
"url": "git+https://github.com/kaskar2008/js-step-system.git"
},
"author": "kaskar2008",
"license": "ISC",
"bugs": {
"url": "https://github.com/kaskar2008/js-step-system/issues"
},
"homepage": "https://github.com/kaskar2008/js-step-system#readme"
}

0 comments on commit 70b071a

Please sign in to comment.