Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bigyouth/gulp-dev
A gulp.js plug in that allows you to toggle html comments so that you can enable functionality for dev vs. production
https://github.com/bigyouth/gulp-dev
Last synced: 6 days ago
JSON representation
A gulp.js plug in that allows you to toggle html comments so that you can enable functionality for dev vs. production
- Host: GitHub
- URL: https://github.com/bigyouth/gulp-dev
- Owner: bigyouth
- License: mit
- Fork: true (Yoksy/gulp-dev)
- Created: 2014-12-16T12:44:38.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2014-12-16T12:51:29.000Z (almost 10 years ago)
- Last Synced: 2024-08-02T20:47:29.289Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 85 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# [gulp](https://github.com/wearefractal/gulp)-dev
> Toggle html comments so that you can enable functionality for dev vs.
> production.Have you ever wanted to test your web page and you smartly (for the most
part!) used appcache and forgot to update your manifest.appcache file?!
Have you ever wanted to include javascript files for development that
would not be there in production? Well, gulp-dev will help you there.**Turn this:**
```htmlMy Page
Hello World!
```
**Into this for development**
```html
My Page
Hello World!
```
**Or into this for production**
```html
My Page
Hello World!
```
## Example Usage with Gulp
**Development Task**
```js
var gulp = require('gulp');
var dev = require('gulp-dev');gulp.task('dev', function() {
gulp.src('home.html')
.pipe(dev(true))
.pipe(gulp.dest('index.html'));
});
```
**Default Task (for prod)**
```js
var gulp = require('gulp');
var dev = require('gulp-dev');gulp.task('dev', function() {
gulp.src('home.html')
.pipe(dev(false))
.pipe(gulp.dest('public/index.html'));
});
```## API
### dev(inDevelopmentMode)
`inDevelopmentMode` is a boolean value that helps us decide what to keep
and what to remove.## License
Copyright (c) 2014 Ryan Olson
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.