Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

grunt-webpage-scaffold

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-webpage-scaffold - npm Package Compare versions

Comparing version 0.1.4 to 0.2.0

2

package.json
{
"name": "grunt-webpage-scaffold",
"description": "Help build the new Webpage project, static resource automatic generation of page demo file and dependence (optional without JS file). Once to initialize grunt, open the default browser to observe the compiled Demo. At the same time will automatically start the Livereload pattern of development, we can start coding directly : )",
"version": "0.1.4",
"version": "0.2.0",
"homepage": "https://github.com/Mickey-/webpage-scaffold",

@@ -6,0 +6,0 @@ "author": {

@@ -8,4 +8,2 @@ # grunt-webpage-scaffold

If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
```shell

@@ -24,68 +22,77 @@ npm install grunt-webpage-scaffold --save-dev

### Overview
In your project's Gruntfile, add a section named `webpage_scaffold` to the data object passed into `grunt.initConfig()`.
```js
grunt.initConfig({
webpage_scaffold: {
options: {
// Task-specific options go here.
},
your_target: {
// Target-specific file lists and/or options go here.
},
},
});
```
In Gruntfile, you need some config ,for example:
module.exports = (grunt) ->
grunt.initConfig
webpage:
options:
#coffee: 'coffee/page/'
js: 'js/page/'
less: 'less/page/'
lessCommonCode: '@import "../var";'
demo: 'demos/'
demoShowPath: 'http://localhost/git/moc/build/demos/'
tplPath: '.tpl'
### Options
#### options.separator
#### options.js
Type: `String`
Default value: `', '`
Default value: `'js/page/'`
A string value that is used to do something with whatever.
A string value that is used to determine where to generate js file. __It's 'mutually exclusive with options.coffee__
#### options.punctuation
#### options.coffee
Type: `String`
Default value: `'.'`
Default value: `''`
A string value that is used to do something else with whatever else.
A string value that is used to determine where to generate coffee file. __It's 'mutually exclusive with options.js__
### Usage Examples
#### options.less
Type: `String`
Default value: `'less/page/'`
#### Default Options
In this example, the default options are used to do something with whatever. So if the `testing` file has the content `Testing` and the `123` file had the content `1 2 3`, the generated result would be `Testing, 1 2 3.`
A string value that is used to determine where to generate less file.
```js
grunt.initConfig({
webpage_scaffold: {
options: {},
files: {
'dest/default_options': ['src/testing', 'src/123'],
},
},
});
```
#### options.lessCommonCode
Type: `String`
Default value: `''`
#### Custom Options
In this example, custom options are used to do something else with whatever else. So if the `testing` file has the content `Testing` and the `123` file had the content `1 2 3`, the generated result in this case would be `Testing: 1 2 3 !!!`
A string value that is used to write __something common__ into less file at the top.
```js
grunt.initConfig({
webpage_scaffold: {
options: {
separator: ': ',
punctuation: ' !!!',
},
files: {
'dest/default_options': ['src/testing', 'src/123'],
},
},
});
#### options.demo
Type: `String`
Default value: `'demo/'`
A string value that is used to determine where to generate html demo file.
#### options.demoShowPath
Type: `String`
Default value: `'./build/demos/'`
A string value that is used to determine what url to open in browser for preview.
#### options.tplPath
Type: `String`
Default value: `'.tpl'`
A string value that is used to determine which template file to use for generate demo file..
### Default Options
```
opt = this.options(
coffee: false
js: 'js/page/'
less: 'less/page/'
lessCommonCode: ''
demo: 'demos/'
demoShowPath: './build/demos/'
tplPath: '.tpl'
)
```
## Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).
## Release History
_(Nothing yet)_
welcome!

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc