Rev. | Zeit | Autor | Nachricht RSS |
9336142e | 2016-09-30 02:02:14 | Akito Hachiya | Create boilerplate (made by generator-chrome-extension-ki... |
12fca89c | 2016-09-30 01:52:15 | Akito Hachiya | Initial commit |
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
$ npm install
Run $ gulp --watch
and load the dist
-directory into chrome.
There are two kinds of entryfiles that create bundles.
./app/scripts
directory./app/styles
directory$ gulp
Option | Description |
---|---|
--watch |
Starts a livereload server and watches all assets. To reload the extension on change include livereload.js in your bundle. |
--production |
Minifies all assets |
--verbose |
Log additional data to the console. |
--vendor |
Compile the extension for different vendors (chrome, firefox, opera) Default: chrome |
--sourcemaps |
Force the creation of sourcemaps. Default: !production |
Zips your dist
directory and saves it in the packages
directory.
$ gulp pack --vendor=firefox
Increments version number of manifest.json
and package.json
,
commits the change to git and adds a git tag.
$ gulp patch // => 0.0.X
or
$ gulp feature // => 0.X.0
or
$ gulp release // => X.0.0
The build tool also defines a variable named ENV
in your scripts. It will be set to development
unless you use the --production
option.
Example: ./app/background.js
if(ENV === 'development'){
console.log('We are in development mode!');
}
Welcome to OSDN Wiki system. Here is your chamber Wiki space.
Check Wiki Guide (English) to refer syntax and functions.
[PageInfo]
(auto generated page)
[Permissions]
view:all, edit:admins, delete/config:admins