Skip to content
This repository has been archived by the owner on Oct 28, 2019. It is now read-only.

Add gulp and move source code to src folder #1646

Open
wants to merge 2 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
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -161,3 +161,8 @@ pip-log.txt

# Mac crap
.DS_Store

#others
node_modules
out
package-lock.json
38 changes: 38 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
var gulp = require('gulp');
var uglify = require('gulp-uglify');
var concat = require('gulp-concat');
var zip = require('gulp-zip');
var del = require('del');
var babel = require('gulp-babel')

gulp.task('dir', function(){
return gulp.src('*.*', {read: false})
.pipe(gulp.dest('./out/build'))
})

gulp.task('js', function(){
return gulp.src(['./src/js/*.js'])
.pipe(babel({
presets: ['@babel/env']
}))
.pipe(concat('main.js'))
.pipe(uglify())
.pipe(gulp.dest('./out/build'))
});

gulp.task('build', function(){
return gulp.src([
'./out/build/main.js',
'./src/**',
'!./src/js/*.js',
'./manifest.json'
])
.pipe(zip('EnhancedSteam.zip'))
.pipe(gulp.dest('./out'))
})

gulp.task('clean', function(){
return del('./out/build')
})

gulp.task('default', gulp.series('dir', 'js', 'build', 'clean'));
5 changes: 2 additions & 3 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@
"*://steamcommunity.com/login/*"
],
"js": [
"js/jQuery.min.js",
"enhancedsteam.js"
"main.js"
],
"css": [
"css/enhancedsteam.css"
Expand All @@ -71,7 +70,7 @@
"https://steamcommunity.com/tradeoffer/*"
],
"js": [
"js/steamcommunity.com/tradeoffer.js"
"tradeoffer.js"
],
"css": [
"css/steamcommunity.com/tradeoffer.css"
Expand Down
16 changes: 16 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "enhanced-steam",
"version": "1.0.0",
"devDependencies": {
"del": "^3.0.0",
"gulp": "^4.0.0",
"gulp-babel": "^8.0.0",
"gulp-concat": "^2.5.2",
"gulp-uglify": "^3.0.1",
"gulp-zip": "^4.2.0"
},
"dependencies": {
"@babel/core": "^7.1.2",
"@babel/preset-env": "^7.1.0"
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.