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

qunit-migrate

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

qunit-migrate - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

4

package.json
{
"name": "qunit-migrate",
"version": "1.0.0",
"version": "1.0.1",
"bin": "src/index.js",
"description": "Migrate old QUnit code to 2.x",
"main": "index.js",
"main": "src/main.js",
"scripts": {

@@ -8,0 +8,0 @@ "test": "./node_modules/mocha/bin/mocha -u bdd tests/main.js"

@@ -11,3 +11,3 @@ # QUnit Migrate [![Build Status](https://travis-ci.org/apsdehal/qunit-migrate.svg?branch=master)](https://travis-ci.org/apsdehal/qunit-migrate)

> qunit-migrate "file1, file2, file3" -d -q -w
> $ qunit-migrate "file1, file2, file3" -d -q -w

@@ -62,1 +62,18 @@ __-w__: If you want to write the output to file, default: false

```
## API
> $ npm install --save qunit-migrate
```js
var qunitMigrate = require('qunit-migrate');
var data = 'Some old qunit code';
var options = {
doubleQuotes: true,
definitions: true
};
var modifiedData = qunitMigrate(data, options); // Fixed code
```
## License
MIT © [Amanpreet Singh](https://apsdehal.in)

@@ -9,3 +9,15 @@ #!/usr/bin/env node

var shouldWeWrite = args.w;
var files = args._[0].split(',');
var help = args.h || args.help;
if (help) {
console.log(spitHelp());
process.exit(0);
}
var files = args._[0].split(',').map(function (x) {
// Append .js to all files even if they don't have one
// And strip any extra whitespace
return x.toString().trim().split(".js")[0] + ".js";
});;
var options = {

@@ -43,1 +55,11 @@ definitions: definitions,

}
function spitHelp() {
return 'QUnit Migrate\nMigrate your old QUnit code to new api.\n\n'
+ 'Usage: qunit-migrate "file1, file2, file3" -d -q -w\n\nOptions:\n'
+ '-w: If you want to write the output to file, default: false\n'
+ '-d: If you want definitions support, this will try to add QUnit deps to AMD definitions and anonymous requires.\n Keep in mind, qunit-migrate currently doesn\'t check if qunit definition is already present or not.\n'
+ '-q: If you want double quoutes support, by default we convert to single quotes';
}
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