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

grunt-forcemin

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-forcemin - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

2

package.json

@@ -6,3 +6,3 @@ {

"version": "0.1.0",
"version": "0.1.1",

@@ -9,0 +9,0 @@ "homepage": "https://github.com/msafi/grunt-forcemin",

@@ -38,3 +38,3 @@ # forcemin

```shell
npm install forcemin --save-dev
npm install grunt-forcemin --save-dev
```

@@ -45,3 +45,3 @@

```js
grunt.loadNpmTasks('forcemin');
grunt.loadNpmTasks('grunt-forcemin');
```

@@ -48,0 +48,0 @@

@@ -23,11 +23,2 @@ /*

function(filepath) {
var filename = path.basename(filepath)
// Make sure there are at least two dots in the name. Otherwise it means the file is not versioned and should
// not be added to the dictionary
if (filename.match(/[.]/g).length < 2) {
grunt.log.warn("\n" + filename + ' doesn\'t look revisioned. (Skipped)\n')
return false
}
if (!grunt.file.exists(filepath)) {

@@ -47,2 +38,9 @@ grunt.log.warn('Source file "' + filepath + '" not found.')

// Make sure there are at least two dots in the name. Otherwise it means the file is not versioned and should
// not be added to the dictionary
if (filename.match(/[.]/g).length < 2) {
grunt.log.warn("\n'" + filename + '\' doesn\'t look revisioned. References to it won\'t be updated.\n')
return
}
unversionedFilename = filename.replace(/^(.*?)\./, '')

@@ -49,0 +47,0 @@ dictionary[unversionedFilename] = filename

@@ -48,6 +48,7 @@ 'use strict';

it('should not consider files that have fewer than two dots in them', function(done) {
fileOperatedOn = bootstrap(['test/temp/robots.txt'])
it('should not add files with fewer than two dots to dictionary, but should still update their contents', function(done) {
fileOperatedOn = bootstrap(['test/temp/robots.txt', 'test/temp/mc4593fc.second.script.js.map'])
expect(fileOperatedOn.robots).to.be('robots.txt')
expect(grunt.file.read("test/temp/robots.txt")).to.be('mc4593fc.second.script.js.map')
done()

@@ -54,0 +55,0 @@ })

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