grunt-ractive
Advanced tools
Comparing version 0.0.1 to 0.1.0
@@ -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 @@ }, |
{ | ||
"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(); | ||
} | ||
}; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
35763
20
603