Socket
Socket
Sign inDemoInstall

grunt-contrib-templify

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-contrib-templify - npm Package Compare versions

Comparing version 0.0.4 to 0.1.0

.settings/.jsdtscope

41

Gruntfile.js

@@ -61,42 +61,5 @@

unit: {
specs: "./spec/**",
specs: ["./specs/**"],
helpers: []
}
},
karma: {
options: {
reporters: ["spec", "junit"],
frameworks: ["jasmine"],
singleRun: true,
browsers: ["PhantomJS"],
junitReporter: {
outputDir: "./reports/jasmine", // results will be saved as $outputDir/$browserName.xml
outputFile: undefined, // if included, results will be saved as $outputDir/$browserName/$outputFile
suite: "", // suite will become the package name attribute in xml testsuite element
useBrowserName: true, // add browser name to report and classes names
nameFormatter: undefined, // function (browser, result) to customize the name attribute in xml testcase element
classNameFormatter: undefined, // function (browser, result) to customize the classname attribute in xml testcase element
properties: {} // key value pair of properties to add to the <properties> section of the report
},
specReporter: {
maxLogLines: 1, // limit number of lines logged per test
suppressErrorSummary: true, // do not print error summary
suppressFailed: false, // do not print information about failed tests
suppressPassed: false, // do not print information about passed tests
suppressSkipped: true, // do not print information about skipped tests
showSpecTiming: false // print the time elapsed for each spec
},
files: [
"node_modules/angular/angular.js",
"node_modules/angular-mocks/angular-mocks.js",
"specs/templates.js",
"specs/scenerios.js"
]
},
unit: {
singleRun: true,
},
continuous: {
singleRun: false
}
}

@@ -127,3 +90,3 @@ };

/* Set tasks */
grunt.registerTask("default", ["eslint:files"]);
grunt.registerTask("default", ["eslint:contrib"]);
grunt.registerTask("test", ["eslint:contrib", "jasmine_nodejs"]);

@@ -130,0 +93,0 @@ // grunt.registerTask("karma", ["eslint:contrib", "karma:continuous"]);

{
"name": "grunt-contrib-templify",
"version": "0.0.4",
"version": "0.1.0",
"description": "A simple project for quick and dirty conversion of HTML files to javascript for various cases, particularly unit testing.",

@@ -21,4 +21,4 @@ "main": "index.js",

"author": {
"name": "Alexander Anderson",
"email": "aetherwalker@refugesystems.net"
"name": "Alexander Anderson",
"email": "aetherwalker@refugesystems.net"
},

@@ -49,3 +49,6 @@ "license": "MIT",

"load-grunt-tasks": "^3.5.2"
},
"dependencies": {
"glob": "^7.1.2"
}
}

@@ -59,2 +59,30 @@ # grunt-contrib-templify

* vue
The task creates a Vue Plugin to provide the HTML files as templates:
```javascript
var Templify = {};
Templify.install = function(Vue, options) {
Vue.templified = function(name) {
switch(name) {
case "[Filename]": return [Template];
//...
default: return undefined;
}
};
};
```
To use the Plugin, your code will have to call
```javascript
Vue.use(Templify);
```
And then your components should be able to access their templates:
```javascript
Vue.component("example", {
// ...
"template": Vue.templified("[Filename]")
});
```
* jasmine-angular (Also karma-angular)

@@ -61,0 +89,0 @@

@@ -7,16 +7,16 @@

beforeEach(function() {
templifier = require("./tasks/templifier.js");
templifier = require("../../tasks/templifier.js");
});
it("Creates the specified output file when fully specified", function() {
xit("Creates the specified output file when fully specified", function() {
});
it("Throws an appropriate error when a key configuration is missing", function() {
xit("Throws an appropriate error when a key configuration is missing", function() {
});
it("responds to path rewrite functions correctly", function() {
xit("responds to path rewrite functions correctly", function() {
});
});

@@ -10,5 +10,5 @@

it("Creates the specified output file", function() {
xit("Creates the specified output file", function() {
});
});

@@ -10,5 +10,5 @@

it("Creates the specified output file", function() {
xit("Creates the specified output file", function() {
});
});

@@ -10,5 +10,5 @@

it("Creates the specified output file", function() {
xit("Creates the specified output file", function() {
});
});

@@ -15,2 +15,4 @@ /*

var glob = require("glob");
/* Track the current working directory */

@@ -68,4 +70,7 @@ var currentDir = __dirname.replace(/\\/g, "/") + "/../";

}
/* Deprecated flat directory search
dir.files = fs.readdirSync(dir.path);
*/
dir.files = glob.sync(dir.path);
dir.files.forEach(function(file) {

@@ -72,0 +77,0 @@ path = dir.path + file;

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