diff --git a/Gruntfile.js b/Gruntfile.js index 59e6e32..c255ecf 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -4,13 +4,13 @@ module.exports = function(grunt) { grunt.initConfig({ inline: { dist: { - src: ['test/dist/*.html'], - dest: ['tmp/'] + src: 'test/dist/*.html', + dest: 'tmp/' } }, clean: { - tests: ['tmp/'] + tests: 'tmp/' }, htmlmin: { diff --git a/npm-debug.log b/npm-debug.log deleted file mode 100644 index eeac3e8..0000000 --- a/npm-debug.log +++ /dev/null @@ -1,110 +0,0 @@ -0 info it worked if it ends with ok -1 verbose cli [ 'node', '/usr/local/bin/npm', 'publish' ] -2 info using npm@1.4.14 -3 info using node@v0.10.29 -4 verbose publish [ '.' ] -5 verbose cache add [ '.', null ] -6 verbose cache add name=undefined spec="." args=[".",null] -7 verbose parsed url { protocol: null, -7 verbose parsed url slashes: null, -7 verbose parsed url auth: null, -7 verbose parsed url host: null, -7 verbose parsed url port: null, -7 verbose parsed url hostname: null, -7 verbose parsed url hash: null, -7 verbose parsed url search: null, -7 verbose parsed url query: null, -7 verbose parsed url pathname: '.', -7 verbose parsed url path: '.', -7 verbose parsed url href: '.' } -8 silly lockFile 3a52ce78- . -9 verbose lock . /Users/a/.npm/3a52ce78-.lock -10 verbose tar pack [ '/Users/a/.npm/grunt-inline/0.3.3/package.tgz', '.' ] -11 verbose tarball /Users/a/.npm/grunt-inline/0.3.3/package.tgz -12 verbose folder . -13 info prepublish grunt-inline@0.3.3 -14 silly lockFile 1f1177db-tar tar://. -15 verbose lock tar://. /Users/a/.npm/1f1177db-tar.lock -16 silly lockFile 9f87bd96-m-grunt-inline-0-3-3-package-tgz tar:///Users/a/.npm/grunt-inline/0.3.3/package.tgz -17 verbose lock tar:///Users/a/.npm/grunt-inline/0.3.3/package.tgz /Users/a/.npm/9f87bd96-m-grunt-inline-0-3-3-package-tgz.lock -18 silly lockFile 1f1177db-tar tar://. -19 silly lockFile 1f1177db-tar tar://. -20 silly lockFile 9f87bd96-m-grunt-inline-0-3-3-package-tgz tar:///Users/a/.npm/grunt-inline/0.3.3/package.tgz -21 silly lockFile 9f87bd96-m-grunt-inline-0-3-3-package-tgz tar:///Users/a/.npm/grunt-inline/0.3.3/package.tgz -22 silly lockFile f04d4788-a-npm-grunt-inline-0-3-3-package /Users/a/.npm/grunt-inline/0.3.3/package -23 verbose lock /Users/a/.npm/grunt-inline/0.3.3/package /Users/a/.npm/f04d4788-a-npm-grunt-inline-0-3-3-package.lock -24 silly lockFile f04d4788-a-npm-grunt-inline-0-3-3-package /Users/a/.npm/grunt-inline/0.3.3/package -25 silly lockFile f04d4788-a-npm-grunt-inline-0-3-3-package /Users/a/.npm/grunt-inline/0.3.3/package -26 silly lockFile 3a52ce78- . -27 silly lockFile 3a52ce78- . -28 silly publish { author: -28 silly publish { name: '程序猿小卡', -28 silly publish email: 'chyingp@gmail.com', -28 silly publish url: 'https://github.com/chyingp' }, -28 silly publish name: 'grunt-inline', -28 silly publish description: 'Inlines img, script and link tags into the same file.', -28 silly publish version: '0.3.3', -28 silly publish keywords: [ 'gruntplugin', 'inline', 'js', 'css' ], -28 silly publish main: 'inline', -28 silly publish repository: -28 silly publish { type: 'git', -28 silly publish url: 'https://github.com/chyingp/grunt-inline.git' }, -28 silly publish engines: { node: '>=0.8.0' }, -28 silly publish devDependencies: -28 silly publish { 'grunt-contrib-nodeunit': '~0.1.2', -28 silly publish 'grunt-contrib-clean': '~0.4.0', -28 silly publish 'grunt-contrib-htmlmin': '~0.1.3', -28 silly publish grunt: '~0.4.0' }, -28 silly publish dependencies: { 'uglify-js': '2.4.1', datauri: '~0.2.0', 'clean-css': '1.1.7' }, -28 silly publish scripts: { test: 'grunt test' }, -28 silly publish _id: 'grunt-inline@0.3.3', -28 silly publish _from: '.', -28 silly publish readme: '# grunt-inline[](http://travis-ci.org/miniflycn/grunt-inline)\r\n\r\nBrings externally referenced resources, such as js, css and images, into\r\na single file.\r\n\r\nFor exmample:\r\n\r\n````\r\n\r\n````\r\nis replaced with\r\n````\r\n\r\n```\r\n\r\nJavascript references are brought inline, and images in the html\r\nand css blocks are converted to base-64 data: urls.\r\n\r\nBy default, only urls marked with `__inline` are converted, however this\r\nbehavior can be overrided via the `tag:` option.\r\n\r\n\r\n## Getting Started\r\nThis plugin requires Grunt `~0.4.1`\r\n\r\nIf 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:\r\n\r\n\tnpm install grunt-inline --save-dev\r\n\r\nOnce the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:\r\n\r\n\tgrunt.loadNpmTasks(\'grunt-inline\');\r\n\r\n## The "grunt-inline" task\r\n\r\n### Overview\r\nIn your project\'s Gruntfile, add a section named `inline` to the data object passed into `grunt.initConfig()`.\r\n\r\n\tgrunt.initConfig({\r\n\t inline: {\r\n\t dist: {\r\n\t src: \'src/index.html\',\r\n\t dest: \'dist/index.html\'\r\n\t }\r\n\t }\r\n\t})\r\n### Options\r\n\r\n#### dest\r\nIf dest is assigned, the the source file will be copied to the destination path. eg:\r\n`src/index.html` will be processed and then copied to `dist/index.html`\r\n\r\n```\r\ngrunt.initConfig({\r\n\tinline: {\r\n\t\tdist: {\r\n\t\t\tsrc: \'src/index.html\',\r\n\t\t\tdest: \'dist/index.html\'\r\n\t\t}\r\n\t}\r\n});\r\n```\r\n\r\n### cssmin\r\nIf cssmin is assigned true, `.css` will be minified before inlined.\r\n\r\n```\r\ngrunt.initConfig({\r\n\tinline: {\r\n\t\tdist: {\r\n\t\t\toptions:{\r\n\t\t\t\tcssmin: true\r\n\t\t\t},\r\n\t\t\tsrc: \'src/index.html\',\r\n\t\t\tdest: \'dist/index.html\'\r\n\t\t}\r\n\t}\r\n});\r\n```\r\n\r\n### tag (defaults to ```__inline```)\r\nOnly URLs that contain the value for ```tag``` will be inlined.\r\nSpecify ```tag: \'\'``` to include all urls.\r\n\r\n```\r\ngrunt.initConfig({\r\n\tinline: {\r\n\t\tdist: {\r\n\t\t\toptions:{\r\n\t\t\t\ttag: \'\'\r\n\t\t\t},\r\n\t\t\tsrc: \'src/index.html\',\r\n\t\t\tdest: \'dist/index.html\']\r\n\t\t}\r\n\t}\r\n});\r\n```\r\n\r\n\r\n### inlineTagAttributes\r\nAbility to add attributes string to inline tag.\r\n\r\n```\r\ngrunt.initConfig({\r\n\tinline: {\r\n\t\tdist: {\r\n\t\t\toptions:{\r\n\t\t\t\tinlineTagAttributes: {\r\n\t\t\t\t\tjs: \'data-inlined="true"\',\t// Adds ``````\r\n\t\t\t\t\tcss: \'data-inlined="true"\'\t// Adds ``````\r\n\t\t\t},\r\n\t\t\tsrc: \'src/index.html\',\r\n\t\t\tdest: \'dist/index.html\'\r\n\t\t}\r\n\t}\r\n});\r\n```\r\n\r\n\r\n### uglify\r\nIf uglify is assigned true, `.js` file will be minified before inlined.\r\n\r\n```\r\ngrunt.initConfig({\r\n\tinline: {\r\n\t\tdist: {\r\n\t\t\toptions:{\r\n\t\t\t\tuglify: true\r\n\t\t\t},\r\n\t\t\tsrc: \'src/index.html\',\r\n\t\t\tdest: \'dist/index.html\'\r\n\t\t}\r\n\t}\r\n});\r\n```\r\n\r\n### exts\r\nSetting an exts array allows multiple file extensions to be processed as\r\nhtml.\r\n\r\n```\r\ngrunt.initConfig({\r\n\tinline: {\r\n\t\tdist: {\r\n\t\t\toptions:{\r\n\t\t\t exts: [\'jade\'],\r\n\t\t\t\tuglify: true\r\n\t\t\t},\r\n\t\t\tsrc: \'src/index.jade\',\r\n\t\t\tdest: \'dist/index.jade\'\r\n\t\t}\r\n\t}\r\n});\r\n```\r\n\r\n### Usage Examples\r\n\r\n> config\r\n\r\n\tgrunt.initConfig({\r\n\t inline: {\r\n\t dist: {\r\n\t src: \'src/index.html\'\r\n\t }\r\n\t }\r\n\t})\r\n\r\n> src/index.html\r\n\r\n\t\r\n\t\t
\r\n\t\t\tI\'m inline html
\r\nhello world!\r\n```\r\n\r\nThen, after the `inline` task is run, the original content in `index.html` will be replaced with\r\n\r\n```\r\nI\'m inline html
\r\nhello world!\r\n```\r\n\r\n## Contributing\r\nIn 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/).\r\n\r\n## Release History\r\n* 2015-01-09 v0.3.3 bug fix: when processing files of a folder and then copy the processed content to another destination, the original files are changed unexpectedly, as mentioned in this issue [Support file globbing for input and output](https://github.com/chyingp/grunt-inline/issues/35)\r\n* 2014-06-16 v0.3.1 bug fix: protocol-relative urls in css are messed up\r\n* 2014-06-15 v0.3.1 bug fix: when options.tag is \'\', then all img tags, whose src attribute has already been inlined will be matched.\r\n* 2014-05-19 v0.3.0 support for new options.exts\r\n* 2014-05-19 v0.2.9 bug fix: options.tag is assigned \'\', bug image url in css are not converted to base64 formate\r\n* 2014-03-06 v0.2.6 bug fix: script tags like were not inlined\r\n* 2014-01-31 v0.2.3 radded tag option, encode url(..) images.\r\n* 2013-10-31 v0.2.2 bug fix: img urls like \'background: url(http://www.example.com/img/bg.png)\' will be transformed to \'background: url(url(http://www.example.com/img/bg.png))\'\r\n* 2013-10-30 v0.2.1 bug fix: when processing relative file path of img url in css stylesheet, forgot to transform "\\" to "/" for windows users\r\n* 2013-10-30 v0.2.0 new feature: Support for minifing js、css when they ar inlined into html.\r\n* 2013-08-30 v0.1.9 bug fix: stylesheets ended with ">" cannot be inlined\r\n* 2013-09-02 v0.1.9 add feature: add options.dest to assign a destination path where the source file will be copied\r\n* 2013-09-02 v0.1.8 add feature: support for `