This commit is contained in:
Philipp Kunz 2015-11-03 19:57:29 +01:00
parent e61ab65dab
commit 39cd77ef7c
11 changed files with 2231 additions and 0 deletions

6
.gitignore vendored Normal file
View File

@ -0,0 +1,6 @@
node_modules/
.settings/
.idea/
ts/*.js
ts/*.js.map

16
.travis.yml Normal file
View File

@ -0,0 +1,16 @@
language: node_js
node_js:
- "4.1"
before_install:
- npm install -g tsd
deploy:
provider: npm
email: npm@smart-coordination.com
api_key:
secure: y7l1JyBDihAYxbqfuPAUXJfY+PC7RSSCkAtXtBIjPA6wytSBnz55te/Vdy8RFgVty6O/k4hHzrhgUJMSoWKmPuGQ5bMBgkyV9OI5PPp4uEUyy5UdcJZv3cZYpGGDRjLjCHP4pF7AHdRcDUMEiE5ZrDtmUH1SBLoRswieO0TKsiMr3u45yR6rHFoPnnw1YlatoAPpiuP3SLnCrIjQeSOS7y9SL6PpakiquJNtpseVOr60sp39L6vLAeqJ7xTjjNJk23LF/60lfiKtM7QFg9qqE7cxFUWJs7Zmgfg4/hGcU9XRfDfZQgSNntcdFczPejO5juv2KOb1tzH7EhXrWlcF1yd70RBdJbcOn7O6ctHjMCGrCSn6IQPzcNWNErFELfMLsjVQUxbfHSc0iA1JxcYWeXUivrStwVOa9ufuG2KZCQZyEjra3zPdCu9yrE30c/mTace7eJXPYTsNn2tmxvTnFoTWmeQ0xL9Iyz9zceADpxjYJoJ8r4XMDWxWga5G9OPaqCINHxjKhOX0C36YEjYTaeNMNHv6F6BPLdKwQ9SmklMtcyC312nJsXwKy+KYJSoY6WqMef9Zk3ez0o09W0UkSr0qiQkyYCoNm8b1L7VrYuccPH24GE0fn8QMWmeE5TBThYbEIdt6NBoYCDeocflUm5KBrImFGo1peeYS1aQnpoQ=
on:
tags: true
repo: pushrocks/gulp-bootstrap
notifications:
slack:
secure: f5Uss0z9RPl/QcA/DroB8loyE93aOYI6bqCkrsiUscmZtlv/TVQtT4dxqGA6uvcG6iTQDBi3Ul88dQxWkRm4IqbhY35/iMaV2dHW4FVYMAh8GQMbsfL2sALCcufxD9blw47awv3iFcwhV1EeyesscjgL0JIjduk96v/7G/6QIO2838M1lzlgtj+kRUkim8qkaEs1je3gRrhMUIjLuAdscMXyUKYFMjWo9ACSjVUl30R/ZNemb18itIja6i92GotreBgcfEMczvy58ovDC7xdJUsY8LjMI01DwY+WPRnI0tAhsuI8moBwwcdM4e3bAjKjucQRjO33O5bMWRZ6QCiYd0DnCEFyCPQLJ4GSy/tkD00n8ijLHAOSV3AH1zNbdK1EAdSPQXDvlI36KJn/2hyQLoitGHVUPr76ujJWP82ypO2tgIp3XQU0dJVCxDuHnwJO2+hjdI+gCPqxNTpjeujHx3UdkTGNRjuuf9dlZ/D08fApjYxy2fxItTqo3QjP/nrqvBXUOPP8yPHpjIT4H2t5Pr4SJjBGI6X4qhKyFj6s9rA/Xu1rL+45zu1C3uC3z+u3T9UwrbzJ/cZM6r6UQvQmUvIfBNaMlg4I/diQCDIPL+Rhop2nylY3IcHmJnk2itn7kOqj1tohCpFEml5pRuSZy4udWywkdtyBAsHWFLF7oiQ=

39
README.md Normal file
View File

@ -0,0 +1,39 @@
# gulp-bootstrap
works with gulp, but does nothing. Use it to bootstrap your own gulp plugin with TypeScript, Travis and npm.
### Buildstatus/Dependencies
[![Build Status](https://travis-ci.org/pushrocks/gulp-bootstrap.svg?branch=master)](https://travis-ci.org/pushrocks/gulp-bootstrap)
[![devDependency Status](https://david-dm.org/pushrocks/gulp-bootstrap/dev-status.svg)](https://david-dm.org/pushrocks/gulp-bootstrap#info=devDependencies)
### Usage
This npm package comes with everything you need to start your own gulp plugin.
Features:
* TypeScript: Code your plugin in TypeScript
* Use gulp to compile TypeScript without the global gulp CLI Tool.
* Use travis to deploy to npm
* Have a master branch for the latest dev version
* Have a release branch for the latest npm version
This package **doesn't require global gulp** (just local -> simply do npm install`) to compile TypeScript.
* to compile TypeScript do `npm test` (You should chain your own tests to this command later on)
* to setup release do `npm run setup`
* to release a patch do `npm run release`
We recommend using travis for npm releasing and test integration.
#### The structure
```
gulp-bootstrap/
|
|- ts/
| |- compile/
| | |- compile.js **** contains gulp task`
| |- index.ts **** Your main TypeScript file.
|
|- index.js **** the compiled module
```

10
index.js Normal file
View File

@ -0,0 +1,10 @@
/// <reference path="typings/tsd.d.ts" />
var through = require("through2");
var path = require("path");
module.exports = function (jadeTemplate, mojo) {
if (mojo === void 0) { mojo = undefined; }
return through.obj(function (file, enc, cb) {
//run callback function to signal end of plugin process.
return cb(null, file);
});
};

33
package.json Normal file
View File

@ -0,0 +1,33 @@
{
"name": "smartfile",
"version": "0.0.0",
"description": "offers smart ways to work with files in nodejs",
"main": "index.js",
"scripts": {
"test": "(cd ts/compile && node compile.js)",
"reinstall": "(rm -r node_modules && npm install)",
"release": "(git pull origin master && npm version patch && git push origin master && git checkout release && git merge master && git push origin release && git checkout master)",
"startdev": "(git checkout master && git pull origin master)"
},
"repository": {
"type": "git",
"url": "https://github.com/pushrocks/smartfile.git"
},
"keywords": [
"filesystem",
"json"
],
"author": "Smart Coordination GmbH <office@push.rocks> (https://push.rocks)",
"license": "MIT",
"bugs": {
"url": "https://github.com/pushrocks/smartfile/issues"
},
"homepage": "https://github.com/pushrocks/smartfile",
"dependencies": {
"pushrocks": "^1.0.18"
},
"devDependencies": {
"gulp": "3.9.0",
"gulp-typescript": "2.9.2"
}
}

21
ts/compile/compile.js Normal file
View File

@ -0,0 +1,21 @@
// import gulp
var gulp = require("gulp")
var gulpTypescript = require("gulp-typescript");
var pr = require("pushrocks");
gulp.task('compileTS', function() {
var stream = gulp.src('../index.ts')
.pipe(gulpTypescript({
out: "index.js"
}))
.pipe(gulp.dest("../../"));
return stream;
});
gulp.task('default',['compileTS'], function() {
pr.beautylog.success('Typescript compiled');
});
//lets tell gulp to start with the default task.
pr.beautylog.log('Starting Gulp to compile TypeScript');
gulp.start.apply(gulp, ['default']);

2
ts/compile/readme.md Normal file
View File

@ -0,0 +1,2 @@
# How to compile.
Make sure gulp and gulp-taypescript from npm are available. Then run the gulpfile in this directory.

12
ts/index.ts Normal file
View File

@ -0,0 +1,12 @@
/// <reference path="typings/tsd.d.ts" />
var through = require("through2");
var path = require("path");
module.exports = (jadeTemplate,mojo = undefined) => {
return through.obj((file, enc, cb) => {
//run callback function to signal end of plugin process.
return cb(null, file);
});
};

12
ts/tsd.json Normal file
View File

@ -0,0 +1,12 @@
{
"version": "v4",
"repo": "borisyankov/DefinitelyTyped",
"ref": "master",
"path": "typings",
"bundle": "typings/tsd.d.ts",
"installed": {
"node/node.d.ts": {
"commit": "efa0c1196d7280640e624ac1e7fa604502e7bd63"
}
}
}

2079
ts/typings/node/node.d.ts vendored Normal file

File diff suppressed because it is too large Load Diff

1
ts/typings/tsd.d.ts vendored Normal file
View File

@ -0,0 +1 @@
/// <reference path="node/node.d.ts" />