Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update all npm packages #292

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ node_modules
dist
**/*.css
npm-debug.log
*.sublime-project
*.sublime-workspace
2 changes: 1 addition & 1 deletion examples/pages/callback.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</div>

<!-- Scripts -->
<script src="./parallax.js"></script>
<script src="../parallax.js"></script>
<script>

function myAwesomeCallback() {
Expand Down
2 changes: 1 addition & 1 deletion examples/pages/destroy.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</div>

<!-- Scripts -->
<script src="./parallax.js"></script>
<script src="../parallax.js"></script>
<script>

var scene = document.getElementById('scene');
Expand Down
2 changes: 1 addition & 1 deletion examples/pages/hoveronly.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</div>

<!-- Scripts -->
<script src="./parallax.js"></script>
<script src="../parallax.js"></script>
<script>

var scene = document.getElementById('scene');
Expand Down
2 changes: 1 addition & 1 deletion examples/pages/input_element.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
</div>

<!-- Scripts -->
<script src="./parallax.js"></script>
<script src="../parallax.js"></script>
<script>

// Elements
Expand Down
2 changes: 1 addition & 1 deletion examples/pages/interactive.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
</div>

<!-- Scripts -->
<script src="./parallax.js"></script>
<script src="../parallax.js"></script>
<script>

// Nothing new here...it's all in the CSS!
Expand Down
2 changes: 1 addition & 1 deletion examples/pages/relative.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
</div>

<!-- Scripts -->
<script src="./parallax.js"></script>
<script src="../parallax.js"></script>
<script>

// Elements
Expand Down
2 changes: 1 addition & 1 deletion examples/pages/selector.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</div>

<!-- Scripts -->
<script src="./parallax.js"></script>
<script src="../parallax.js"></script>
<script>

var scene = document.getElementById('scene');
Expand Down
2 changes: 1 addition & 1 deletion examples/pages/separate_axis_data.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
</div>

<!-- Scripts -->
<script src="./parallax.js"></script>
<script src="../parallax.js"></script>
<script>

// Pretty simple huh?
Expand Down
2 changes: 1 addition & 1 deletion examples/pages/simple.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</div>

<!-- Scripts -->
<script src="./parallax.js"></script>
<script src="../parallax.js"></script>
<script>

// Pretty simple huh?
Expand Down
34 changes: 17 additions & 17 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,6 @@ const sourcemaps = require('gulp-sourcemaps')
const uglify = require('gulp-uglify')
const util = require('gulp-util')

gulp.task('clean', (cb) => {
rimraf('./dist', cb)
})

gulp.task('build', ['clean'], () => {
gulp.start('build:js', 'build:scss')
})

function showError(arg) {
notifier.notify({
title: 'Error',
Expand All @@ -34,6 +26,10 @@ function showError(arg) {
this.emit('end')
}

gulp.task('clean', (cb) => {
rimraf('./dist', cb)
})

gulp.task('build:scss', () => {
return gulp.src(path.join('examples', 'assets', 'styles.scss'))
.pipe(sass({
Expand All @@ -46,17 +42,15 @@ gulp.task('build:scss', () => {
this.emit('end')
}))
.pipe(postcss([
autoprefixer({
browsers: ['last 2 versions', 'Firefox ESR', 'Explorer >= 9', 'Android >= 4.0', '> 2%']
})
autoprefixer()
]))
.pipe(gulp.dest(path.join('examples', 'assets')))
.pipe(browsersync.stream({match: '**/*.css'}))
})

gulp.task('build:js', () => {
return browserify({entries: path.join('src', 'parallax.js'), debug: false, standalone: 'Parallax'})
.transform("babelify", {presets: ["es2015"]})
.transform("babelify", {presets: ["@babel/preset-env"]})
.bundle()
.on('error', showError)
.pipe(source('parallax.js'))
Expand All @@ -71,7 +65,13 @@ gulp.task('build:js', () => {
.pipe(browsersync.stream({match: path.join('**','*.js')}))
})

gulp.task('watch', ['build'], () => {
gulp.task('build',
gulp.series('clean',
gulp.parallel('build:scss', 'build:js')
)
);

gulp.task('watch', gulp.series('build', () => {
browsersync.init({
notify: false,
port: 9000,
Expand All @@ -80,9 +80,9 @@ gulp.task('watch', ['build'], () => {
directory: true
}
})
gulp.watch(path.join('src', '*.js'), ['build:js'])
gulp.watch(path.join('examples', 'assets', '*.scss'), ['build:scss'])
gulp.watch(path.join('src', '*.js'), gulp.series('build:js'))
gulp.watch(path.join('examples', 'assets', '*.scss'), gulp.series('build:scss'))
gulp.watch(path.join('examples', 'pages', '*.html'), browsersync.reload)
})
}));

gulp.task('default', ['watch'])
gulp.task('default', gulp.series('watch'));
Loading