New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

illusionist

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

illusionist - npm Package Compare versions

Comparing version 0.0.2 to 0.1.0

11

lib/renderer.js

@@ -33,3 +33,12 @@ var path = require('path');

transpileES6Modules: function() {
var moduleName = path.basename(this.options.fileName, '.js');
var moduleName;
if (this.options.moduleName) {
moduleName = this.options.moduleName;
} else if (this.options.basePath) {
moduleName = path.relative(this.options.basePath, this.options.fileName).replace(/\.js$/, '');
} else {
moduleName = path.basename(this.options.fileName, '.js');
}
return new ES6ModuleCompiler(this.buffer, moduleName).toAMD();

@@ -36,0 +45,0 @@ },

2

package.json
{
"name": "illusionist",
"version": "0.0.2",
"version": "0.1.0",
"description": "Illusionist transpiles ES6 files to ES5",

@@ -5,0 +5,0 @@ "main": "./lib/illusionist.js",

@@ -18,8 +18,8 @@ # Illusionist

-h, --help Display help information
-o, --out <dir> Output to <dir> when passing files or output a parallel
directory tree in <dir> when passing a directory
-p, --print Print out the compiled ES5
-v, --version Display the version of Illusionist
-w, --watch Watch file(s) for changes and re-compile
-h, --help Display help information
-m, --module-name Module name for stdin
-o, --out <dir> Output to <dir> when passing files
-p, --print Print out the compiled ES5
-v, --version Display the version of Illusionist
-w, --watch Watch file(s) for changes and re-compile
```

@@ -86,4 +86,25 @@

For the time being, the module only takes 1 option (`fileName`) which is used to output the AMD module name.
The module can take 3 options:
- `moduleName` - defines the AMD module name.
__Passing this option will ignore `fileName` and `basePath`.__
- `fileName` - path to the file, used to define the AMD module name
- `basePath` - when passing `basePath` and `fileName`, the AMD module name will be `fileName` relative to `basePath`
```
// Module will be named 'controllers/foo_controller'
illusionist(stringOfES6, {moduleName: 'controllers/foo_controller'})
// Module will be named 'controllers/foo_controller'
illusionist(stringOfES6, {
basePath: '/Volumes/mirego/MyApp/assets/js/',
fileName: '/Volumes/mirego/MyApp/assets/js/controllers/foo_controller.js'
});
// Module will be named 'foo_controller'
illusionist(stringOfES6, {
fileName: '/Volumes/mirego/MyApp/assets/js/controllers/foo_controller.js'
});
```
### Async version

@@ -223,4 +244,4 @@

Mirego is a team of passionate people who believe that work is a place where you can innovate and have fun. We proudly build mobile applications for [iPhone](http://mirego.com/en/iphone-app-development/ "iPhone application development"), [iPad](http://mirego.com/en/ipad-app-development/ "iPad application development"), [Android](http://mirego.com/en/android-app-development/ "Android application development"), [Blackberry](http://mirego.com/en/blackberry-app-development/ "Blackberry application development"), [Windows Phone](http://mirego.com/en/windows-phone-app-development/ "Windows Phone application development") and [Windows 8](http://mirego.com/en/windows-8-app-development/ "Windows 8 application development") in beautiful Quebec City.
[Mirego](http://mirego.com) is a team of passionate people who believe that work is a place where you can innovate and have fun. We're team of [talented people](http://life.mirego.com) who imagine and build beautiful web and mobile applications. We come together to share ideas and [change the world](http://mirego.org).
We also love [open-source software](http://open.mirego.com/) and we try to extract as much code as possible from our projects to give back to the community.
We also [love open-source software](http://open.mirego.com) and we try to give back to the community as much as we can.

Sorry, the diff of this file is not supported yet

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