Skip to content

Commit

Permalink
chore(all): prepare release 1.0.0-beta.2.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
EisenbergEffect committed Jun 15, 2016
1 parent 425a3d6 commit c4fbf20
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 18 deletions.
3 changes: 0 additions & 3 deletions .eslintrc

This file was deleted.

3 changes: 3 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "./node_modules/aurelia-tools/.eslintrc.json"
}
12 changes: 8 additions & 4 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var path = require('path');
var path = require('upath');
var ContextElementDependency = require('webpack/lib/dependencies/ContextElementDependency');
var resolveTemplates = require('./resolve-template');

Expand All @@ -23,8 +23,8 @@ var AureliaWebpackPlugin = function () {
var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
(0, _classCallCheck3.default)(this, AureliaWebpackPlugin);

options.root = options.root || path.dirname(module.parent.filename);
options.src = options.src || path.resolve(options.root, 'src');
options.root = path.normalizeSafe(options.root) || path.dirname(module.parent.filename);
options.src = path.normalizeSafe(options.src) || path.resolve(options.root, 'src');
options.resourceRegExp = options.resourceRegExp || /aurelia-loader-context/;

this.options = options;
Expand All @@ -43,7 +43,8 @@ var AureliaWebpackPlugin = function () {
});
cmf.plugin('after-resolve', function (result, callback) {
if (!result) return callback();
if (_this.options.src.indexOf(result.resource, _this.options.src.length - result.resource.length) !== -1) {
var resourcePath = path.normalizeSafe(result.resource);
if (_this.options.src.indexOf(resourcePath, _this.options.src.length - resourcePath.length) !== -1) {
(function () {
var resolveDependencies = result.resolveDependencies;

Expand Down Expand Up @@ -116,6 +117,9 @@ var AureliaWebpackPlugin = function () {
return callback(null, dependencies);
}, function (error) {
console.error('Error processing templates', error.message);
console.error('-----------------------');
console.error(error);
console.error('-----------------------');
return callback(error);
});
});
Expand Down
21 changes: 11 additions & 10 deletions dist/resolve-template.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ var processAll = function () {

case 63:
fromPath = _ref3;
_moduleName = fromPath.split(path.sep)[0];
_moduleName = fromPath.split(pathSep)[0];
rootAlias = resource.root ? path.resolve(options.root, 'node_modules', _moduleName, resource.root) : undefined;

if (!rootAlias && baseVendorPkg.aurelia.build.moduleRootOverride && baseVendorPkg.aurelia.build.moduleRootOverride[_moduleName]) {
Expand Down Expand Up @@ -422,7 +422,7 @@ var getDependency = function () {
case 0:
if (webpackRequireString.indexOf('..') == -1) {
dependencies[webpackRequireString] = webpackPath;
console.log((fromWithinModule ? '<' + fromWithinModule + '> ' + '[' + path.basename(requestedBy) : '[' + requestedByRelativeToSrc) + '] required "' + webpackRequireString + '" from "' + webpackPath.replace(optionsGlobal.root + path.sep, '') + '".');
console.log((fromWithinModule ? '<' + fromWithinModule + '> ' + '[' + path.basename(requestedBy) : '[' + requestedByRelativeToSrc) + '] required "' + webpackRequireString + '" from "' + webpackPath.replace(optionsGlobal.root + pathSep, '') + '".');
filesProcessed.push(webpackRequireString);
}

Expand All @@ -435,7 +435,7 @@ var getDependency = function () {


dependencies[htmlWebpackRequireString] = getPath(htmlCounterpart, isLazy, bundleName);
console.log((fromWithinModule ? '<' + fromWithinModule + '> ' + '[' + path.basename(requestedBy) : '[' + requestedByRelativeToSrc) + '] required "' + htmlWebpackRequireString + '" from "' + htmlCounterpart.replace(optionsGlobal.root + path.sep, '') + '".');
console.log((fromWithinModule ? '<' + fromWithinModule + '> ' + '[' + path.basename(requestedBy) : '[' + requestedByRelativeToSrc) + '] required "' + htmlWebpackRequireString + '" from "' + htmlCounterpart.replace(optionsGlobal.root + pathSep, '') + '".');

filesProcessed.push(htmlWebpackRequireString);

Expand Down Expand Up @@ -467,7 +467,7 @@ var getDependency = function () {
case 0:
dependencies = {};
requestedByRelativeToSrc = path.relative(srcPath, requestedBy);
split = requestedByRelativeToSrc.split(path.sep);
split = requestedByRelativeToSrc.split(pathSep);

if (split[0] == 'node_modules') {
nodeModulesList = nodeModulesList.concat([path.join(srcPath, 'node_modules')]);
Expand Down Expand Up @@ -607,7 +607,7 @@ var getDependency = function () {
webpackPath = getPath(moduleName, isLazy, bundleName);
webpackRequireString = './' + fromPath;
} else if (stats.isFile()) {
moduleName = fromPath.split('/')[0];
moduleName = fromPath.split(pathSep)[0];
modulePath = path.resolve(nodeModulesList[nodeModulesIndex], moduleName);

webpackPath = getPath(fullPath, isLazy, bundleName);
Expand Down Expand Up @@ -760,7 +760,7 @@ var getDependency = function () {
break;
}

pathParts = fromPath.split('/');
pathParts = fromPath.split(pathSep);

if (!(!pathIsLocal && pathParts.length > 1 && rootAlias && rootAlias !== srcPath)) {
_context5.next = 111;
Expand All @@ -769,7 +769,7 @@ var getDependency = function () {

_moduleName2 = pathParts.shift();
relativeRootAlias = path.relative(srcPath, rootAlias);
relativeRootSplit = relativeRootAlias.split(path.sep);
relativeRootSplit = relativeRootAlias.split(pathSep);

if (relativeRootSplit[0] == '..') {
relativeRootSplit.shift();
Expand All @@ -780,7 +780,7 @@ var getDependency = function () {
}
relativeRootAlias = relativeRootSplit.join('/');

rootedFromPath = path.join(_moduleName2, relativeRootAlias, pathParts.join(path.sep));
rootedFromPath = path.join(_moduleName2, relativeRootAlias, pathParts.join(pathSep));

if (!(rootedFromPath !== fromPath && !triedToCorrectPath)) {
_context5.next = 111;
Expand Down Expand Up @@ -829,12 +829,13 @@ var getDependency = function () {

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var path = require('path');
var path = require('upath');
var fileSystem = require('fs');
var readdir = require('recursive-readdir');
var assign = _assign2.default || require('object.assign');
var Promise = require('bluebird');
var cheerio = require('cheerio');
var pathSep = '/';

var filesProcessed = [];
var modulesProcessed = [];
Expand Down Expand Up @@ -866,7 +867,7 @@ function getPath(input, lazy, bundle) {
}

function getPathWithoutExtension(input) {
return path.join(path.parse(input).dir, path.parse(input).name);
return path.trimExt(input);
}

module.exports = {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aurelia-webpack-plugin",
"version": "1.0.0-beta.2.0.0",
"version": "1.0.0-beta.2.0.1",
"description": "A plugin for webpack that enables bundling Aurelia applications.",
"keywords": [
"aurelia",
Expand Down

0 comments on commit c4fbf20

Please sign in to comment.