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

grunt-ractive

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-ractive - npm Package Compare versions

Comparing version 0.0.1 to 0.1.0

test/dest/tmp1/clock_in_ract.js

13

Gruntfile.js

@@ -50,2 +50,15 @@ 'use strict';

}
},
names:{
options:{
type: 'cjs'
},
files:{
'test/dest/tmp1/': 'test/src/*'
}
},
defs:{
files:{
'test/dest/tmp2/': 'test/src/*'
}
}

@@ -52,0 +65,0 @@ },

4

package.json
{
"name": "grunt-ractive",
"description": "Compile Ractive components with Grunt",
"version": "0.0.1",
"version": "0.1.0",
"homepage": "https://github.com/ekhaled/grunt-ractive",

@@ -52,3 +52,3 @@ "author": {

"readmeFilename": "README.md",
"_id": "grunt-ractive@0.0.1",
"_id": "grunt-ractive@0.1.0",
"_shasum": "",

@@ -55,0 +55,0 @@ "_resolved": "git://github.com/ekhaled/grunt-ractive#",

@@ -59,4 +59,4 @@ /*

if (detectDestType(filepath) === 'directory') {
dest = makeComponentName(filepath);
if (detectDestType(explicitDestination) === 'directory') {
dest = path.join(explicitDestination, makeComponentName(filepath));
} else {

@@ -74,3 +74,3 @@ dest = explicitDestination;

return filepath.split(path.sep).pop()
.replace('.html', '')
.replace(/\.html|\.ract/, '')
.replace(/\s/g, '_') + '.js';

@@ -77,0 +77,0 @@ }

@@ -56,3 +56,36 @@ 'use strict';

test.done();
},
filenames: function(test) {
test.expect(4);
test.equal(
grunt.file.exists('test/dest/tmp1/clock.js'),
true,
'A file has been created with the expected file name.'
);
test.equal(
grunt.file.read('test/dest/tmp1/clock.js'),
grunt.file.read('test/expected/clock_cjs.js'),
'Derived file name contains the expected content.'
);
test.equal(
grunt.file.exists('test/dest/tmp1/clock_in_ract.js'),
true,
'A file has been created with the expected file name.'
);
test.equal(
grunt.file.read('test/dest/tmp1/clock_in_ract.js'),
grunt.file.read('test/expected/clock_cjs.js'),
'Derived file name contains the expected content.'
);
test.done();
},
defs: function(test) {
test.expect(1);
test.equal(
grunt.file.read('test/dest/tmp2/clock.js'),
grunt.file.read('test/expected/clock_amd.js'),
'By default AMD modules are created'
);
test.done();
}
};
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