在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):brillout/gulp-jspm开源软件地址(OpenSource Url):https://github.com/brillout/gulp-jspm开源编程语言(OpenSource Language):JavaScript 98.7%开源软件介绍(OpenSource Introduction):issue #45 - Looking for a maintainer / forkCurrently unmaintained, see
Usagevar gulp = require('gulp');
var gulp_jspm = require('gulp-jspm'); // npm install gulp-jspm
gulp.task('default', function(){
return gulp.src('src/main.js')
.pipe(gulp_jspm())
.pipe(gulp.dest('build/'));
}); This will generate the Many code snippets shown in this Readme are implemented at demo/gulpfile.js. Before Opening an IssueWhen opening an issue, copy the debug logs in the ticket.
The debug logs are printed when running Source Mapvar sourcemaps = require('gulp-sourcemaps');
gulp.src('src/main.js')
.pipe(sourcemaps.init())
.pipe(gulp_jspm())
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest('build/')); Options// exclude message.js from bundle
gulp.src('src/main.js')
.pipe(gulp_jspm({arithmetic: '- message'}))
.pipe(gulp.dest('build/'));
// `jspm bundle-sfx main`
gulp.src('src/main.js')
.pipe(gulp_jspm({selfExecutingBundle: true}))
.pipe(gulp.dest('build/'));
// `jspm bundle main.jsx!`
gulp.src('src/main.jsx')
.pipe(gulp_jspm({plugin: true}))
.pipe(gulp.dest('build/'));
// `jspm bundle main.jsx!jsx`
gulp.src('src/main.jsx')
.pipe(gulp_jspm({plugin: 'jsx'}))
.pipe(gulp.dest('build/'));
// print information logs about the internal progress of `gulp-jspm`
gulp.src('src/main.js')
.pipe(gulp_jspm({verbose: true}))
.pipe(gulp.dest('build/'));
// rename the bundled file
gulp.src('src/main.js')
.pipe(gulp_jspm({fileName: 'other-name'})) // do not include file extension
.pipe(gulp.dest('build/'));
// All other options given to gulp-jspm are passed on to jspm.
// All jspm options can therefore be passed to `gulp-jspm`
// (`minify`, `mangle`, `lowResSourceMaps`, etc.).
// For example:
gulp.src('src/main.js')
.pipe(gulp_jspm({inject: true})) // `jspm bundle main --inject`
.pipe(gulp.dest('build/')); Original Entry Pointgulp.src('src/main.js')
.pipe(gulp_jspm())
.pipe(pass(function(vinyl_file){
assert( vinyl_file.relative === 'main.bundle.js' );
assert( vinyl_file.originalEntryPoint.relative === 'main.js' );
})); Run Gulpfile DemoTo run the code snippets above execute following commands. git clone git@github.com:brillout/gulp-jspm
cd gulp-jspm/
npm install
cd demo/
npm install
npm install -g jspm
npm install -g gulp
jspm install
gulp
gulp sourcemap
gulp test |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论