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

broccoli-es6-module-transpiler

Package Overview
Dependencies
Maintainers
3
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

broccoli-es6-module-transpiler - npm Package Compare versions

Comparing version 0.4.0 to 0.5.0

49

index.js
'use strict';
var fs = require('fs'),
path = require('path'),
util = require('util'),
mkdirp = require('mkdirp'),
quickTemp = require('quick-temp'),
symlinkOrCopy = require('symlink-or-copy'),
walkSync = require('walk-sync'),
helpers = require('broccoli-kitchen-sink-helpers'),
Writer = require('broccoli-writer');
var fs = require('fs');
var path = require('path');
var util = require('util');
var mkdirp = require('mkdirp');
var quickTemp = require('quick-temp');
var symlinkOrCopy = require('symlink-or-copy');
var walkSync = require('walk-sync');
var helpers = require('broccoli-kitchen-sink-helpers');
var Writer = require('broccoli-writer');
var transpiler = require('es6-module-transpiler'),
Container = transpiler.Container,
FileResolver = transpiler.FileResolver,
Module = require('es6-module-transpiler/lib/module');
var transpiler = require('es6-module-transpiler');
var Container = transpiler.Container;
var FileResolver = transpiler.FileResolver;
var Module = require('es6-module-transpiler/lib/module');

@@ -54,6 +54,7 @@ module.exports = CompileModules;

this.output = options.output || '.';
this.basePath = options.basePath;
this.sourceRoot = options.sourceRoot || '/';
this.description = options.description;
this._cache = {};
this._cacheIndex = 0;
this._cache = {};
}

@@ -159,4 +160,5 @@

var cache = this._cache,
outputIsFile = path.extname(outputPath) === '.js';
var cache = this._cache;
var cacheDir = this.getCacheDir();
var outputIsFile = path.extname(outputPath) === '.js';

@@ -170,4 +172,6 @@ // The container will first use the CacheResolver so that any unchanged

var container = new Container({
formatter: this.formatter,
resolvers: this.getResolvers(cache, srcDir)
formatter : this.formatter,
resolvers : this.getResolvers(cache, srcDir),
basePath : this.basePath || srcDir,
sourceRoot: this.sourceRoot
});

@@ -180,5 +184,2 @@

// Create a new cache sub-dir for this compile run.
var cacheDir = path.join(this.getCacheDir(), String(this._cacheIndex++));
// Determine target path to compile modules to.

@@ -218,4 +219,2 @@ var target = outputIsFile ?

cacheEntry.dir = cacheDir;
cacheEntry.outputFiles = [

@@ -250,3 +249,3 @@ relPath,

CompileModules.prototype.copyFromCache = function (cacheEntry, destDir) {
var cacheDir = cacheEntry.dir;
var cacheDir = this.getCacheDir();

@@ -253,0 +252,0 @@ cacheEntry.outputFiles.forEach(function (outputFile) {

{
"name": "broccoli-es6-module-transpiler",
"version": "0.4.0",
"version": "0.5.0",
"description": "Broccoli plugin for Square's ES6 Module Transpiler",

@@ -32,3 +32,3 @@ "main": "index.js",

"broccoli-writer": "^0.1.1",
"es6-module-transpiler": "^0.9.0",
"es6-module-transpiler": "^0.9.5",
"mkdirp": "^0.5.0",

@@ -35,0 +35,0 @@ "quick-temp": "^0.1.2",

@@ -89,5 +89,21 @@ # Broccoli's ES6 Module Transpiler

---
`options.basePath` *{String}*
The path used to resolve the transpiled modules' source paths against. The resolved path will then serve as the `sourceFileName` value for the module in the output file's source map.
Default: `srcDir`.
---
`options.sourceRoot` *{String}*
The path to use as the `sourceRoot` value in the output file's source map.
Default: `"/"`.
[transpiler]: https://github.com/esnext/es6-module-transpiler
[prev-version]: https://github.com/mmun/broccoli-es6-module-transpiler/tree/transpiler-0.4
[amd-formatter]: https://github.com/caridy/es6-module-transpiler-amd-formatter
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