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

Commit

Permalink
Improve environment for development
Browse files Browse the repository at this point in the history
  • Loading branch information
t.shotoku committed Mar 25, 2015
1 parent 7667d95 commit 47b709e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ node_modules

dist/
dist-*.zip
.env
14 changes: 11 additions & 3 deletions gulpfile.coffee
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
require('dotenv').load()

gulp = require 'gulp'
del = require 'del'
haml = require 'gulp-haml'
Expand All @@ -6,13 +8,19 @@ sass = require 'gulp-sass'
plumber = require 'gulp-plumber'
notify = require 'gulp-notify'
zip = require 'gulp-zip'
manifest = require './src/manifest'
jeditor = require 'gulp-json-editor'

version = require('./package.json').version

gulp.task 'clean', (cb) ->
del 'dist', cb

gulp.task 'copy:manifest', ->
gulp.src 'src/manifest.json'
.pipe jeditor (json) ->
json.version = version
json.permissions.push process.env.FORKWELL_HOST if process.env.FORKWELL_HOST
json
.pipe gulp.dest('dist')

gulp.task 'copy:images', ->
Expand Down Expand Up @@ -61,11 +69,11 @@ gulp.task 'watch', ->
gulp.watch 'src/sass/*.sass', ['sass']

gulp.task 'app_version', ->
console.log "v#{manifest.version}"
console.log "v#{version}"

gulp.task 'zip', ['build'], ->
gulp.src 'dist/**/*'
.pipe zip("dist-v#{manifest.version}.zip")
.pipe zip("dist-v#{version}.zip")
.pipe gulp.dest('.')

gulp.task 'default', ['watch', 'build']
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
"devDependencies": {
"coffee-script": "^1.9.1",
"del": "^1.1.1",
"dotenv": "^1.0.0",
"espower-coffee": "^0.10.0",
"gulp": "^3.8.11",
"gulp-coffee": "^2.3.1",
"gulp-haml": "^0.1.4",
"gulp-json-editor": "^2.2.1",
"gulp-notify": "^2.2.0",
"gulp-plumber": "^1.0.0",
"gulp-sass": "^1.3.3",
Expand Down
3 changes: 1 addition & 2 deletions src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@

"name": "Forkwell for Chrome",
"description": "This extension shows jobs for the current page from Forkwell Jobs",
"version": "1.0.0",

"browser_action": {
"default_icon": "images/icon.png",
"default_popup": "html/popup.html"
},

"permissions": [
"http://jobs.localhost.com:3000/",
"https://jobs.forkwell.com/",
"tabs",
"storage"
],
Expand Down

0 comments on commit 47b709e

Please sign in to comment.