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

angular-es6

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-es6 - npm Package Compare versions

Comparing version 2.0.6 to 3.0.1

.babelrc

4

dist/compileProvider.js
'use strict';
Object.defineProperty(exports, '__esModule', {
Object.defineProperty(exports, "__esModule", {
value: true
});
exports['default'] = compileProvider;
exports.default = compileProvider;
exports.register = register;

@@ -8,0 +8,0 @@ var directives = {};

'use strict';
Object.defineProperty(exports, '__esModule', {
Object.defineProperty(exports, "__esModule", {
value: true
});
var _bind = Function.prototype.bind;
exports.storeInjections = storeInjections;
exports['default'] = createDirectiveFactory;
exports.default = createDirectiveFactory;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _isFunction = require('lodash/lang/isFunction');
var _lodashLangIsFunction = require('lodash/lang/isFunction');
var _isFunction2 = _interopRequireDefault(_isFunction);
var _lodashLangIsFunction2 = _interopRequireDefault(_lodashLangIsFunction);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var LINK_INJECT = ['scope', 'element', 'attrs', 'controller', 'transcludeFn'];
function storeInjections($inject, instance, args) {
if ($inject === undefined) $inject = [];
function storeInjections() {
var $inject = arguments.length <= 0 || arguments[0] === undefined ? [] : arguments[0];
var instance = arguments[1];
var args = arguments[2];
var varName = arguments.length <= 3 || arguments[3] === undefined ? '$inject' : arguments[3];

@@ -37,3 +38,3 @@

var instance = new (_bind.apply(Directive, [null].concat(args)))();
var instance = new (Function.prototype.bind.apply(Directive, [null].concat(args)))();
Object.keys(instance).forEach(function (key) {

@@ -43,3 +44,3 @@ instance[key] = instance[key];

if (instance.link && (0, _lodashLangIsFunction2['default'])(instance.link)) {
if (instance.link && (0, _isFunction2.default)(instance.link)) {
(function () {

@@ -52,3 +53,3 @@ var linkOrg = instance.link;

var inst = new (_bind.apply(Directive, [null].concat(args)))();
var inst = new (Function.prototype.bind.apply(Directive, [null].concat(args)))();
// storeInjections(factory.$inject, inst, args);

@@ -69,3 +70,3 @@

if (instance.controller && (0, _lodashLangIsFunction2['default'])(instance.controller)) {
if (instance.controller && (0, _isFunction2.default)(instance.controller)) {
(function () {

@@ -78,3 +79,3 @@ var controllerOrg = instance.controller;

var inst = new (_bind.apply(Directive, [null].concat(args)))();
var inst = new (Function.prototype.bind.apply(Directive, [null].concat(args)))();
inst.ctrl = _this;

@@ -81,0 +82,0 @@ storeInjections(instance.controller.$inject, inst.ctrl, controllerArgs);

'use strict';
Object.defineProperty(exports, '__esModule', {
Object.defineProperty(exports, "__esModule", {
value: true
});
exports['default'] = exceptionConfig;
exports.default = exceptionConfig;
function exceptionConfig($provide) {

@@ -18,3 +17,2 @@ $provide.decorator('$exceptionHandler', function () {

exceptionConfig.$inject = ['$provide'];
module.exports = exports['default'];
exceptionConfig.$inject = ['$provide'];
'use strict';
Object.defineProperty(exports, '__esModule', {
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.compileProvider = exports.load = exports.Inject = undefined;
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _Inject = require('./Inject');

@@ -23,4 +20,8 @@

exports.Inject = _Inject2['default'];
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.Inject = _Inject2.default;
exports.load = load;
exports.compileProvider = _compileProvider2['default'];
exports.compileProvider = _compileProvider2.default;
'use strict';
Object.defineProperty(exports, '__esModule', {
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
var _createDirectiveFactory = require('./createDirectiveFactory');
var Inject = (function () {
_createClass(Inject, null, [{
key: '$inject',
value: [],
enumerable: true
}]);
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function Inject() {
_classCallCheck(this, Inject);
var Inject = function Inject() {
_classCallCheck(this, Inject);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
(0, _createDirectiveFactory.storeInjections)(this.constructor.$inject, this, args);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return Inject;
})();
(0, _createDirectiveFactory.storeInjections)(this.constructor.$inject, this, args);
};
exports['default'] = Inject;
module.exports = exports['default'];
Inject.$inject = [];
exports.default = Inject;
'use strict';
Object.defineProperty(exports, '__esModule', {
Object.defineProperty(exports, "__esModule", {
value: true

@@ -12,4 +12,2 @@ });

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _path = require('path');

@@ -19,5 +17,5 @@

var _lodashStringCapitalize = require('lodash/string/capitalize');
var _capitalize = require('lodash/string/capitalize');
var _lodashStringCapitalize2 = _interopRequireDefault(_lodashStringCapitalize);
var _capitalize2 = _interopRequireDefault(_capitalize);

@@ -34,2 +32,4 @@ var _angular = require('angular');

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

@@ -40,3 +40,2 @@ return str.substr(0, 1).toLowerCase() + str.substr(1);

// const req = require.context('./', true, /.*\.js$/);
function directives(req) {

@@ -49,3 +48,3 @@ req.keys().forEach(function (filePath) {

var fileName = _path2['default'].basename(filePath, _path2['default'].extname(filePath));
var fileName = _path2.default.basename(filePath, _path2.default.extname(filePath));
var name = parts[1];

@@ -57,3 +56,3 @@ if (!fileName || !name || fileName.toLowerCase() !== name.toLowerCase()) {

var Direktive = req(filePath);
(0, _compileProvider.register)(name, (0, _createDirectiveFactory2['default'])(Direktive));
(0, _compileProvider.register)(name, (0, _createDirectiveFactory2.default)(Direktive.default ? Direktive.default : Direktive));
});

@@ -65,3 +64,3 @@ }

var module = _angular2['default'].module(moduleName, []);
var module = _angular2.default.module(moduleName, []);

@@ -74,3 +73,3 @@ req.keys().forEach(function (filePath) {

var fileName = _path2['default'].basename(filePath, _path2['default'].extname(filePath));
var fileName = _path2.default.basename(filePath, _path2.default.extname(filePath));
var name = parts[1];

@@ -82,3 +81,3 @@ if (!fileName || !name || fileName.toLowerCase() !== name.toLowerCase()) {

var Controller = req(filePath);
module.controller((0, _lodashStringCapitalize2['default'])(name), Controller);
module.controller((0, _capitalize2.default)(name), Controller.default ? Controller.default : Controller);
});

@@ -90,6 +89,6 @@ }

var module = _angular2['default'].module(moduleName, []);
var module = _angular2.default.module(moduleName, []);
req.keys().forEach(function (filePath) {
var name = _path2['default'].basename(filePath, _path2['default'].extname(filePath));
var name = _path2.default.basename(filePath, _path2.default.extname(filePath));
if (name === 'index') {

@@ -100,4 +99,3 @@ return;

var Service = req(filePath);
module.service(firstToLowerCase(name), Service);
module.service(firstToLowerCase(name), Service.default ? Service.default : Service);
});

@@ -109,6 +107,6 @@ }

var module = _angular2['default'].module(moduleName, []);
var module = _angular2.default.module(moduleName, []);
req.keys().forEach(function (filePath) {
var name = _path2['default'].basename(filePath, _path2['default'].extname(filePath));
var name = _path2.default.basename(filePath, _path2.default.extname(filePath));
if (name === 'index') {

@@ -118,3 +116,4 @@ return;

module.factory((0, _lodashStringCapitalize2['default'])(name), req(filePath));
var factory = req(filePath);
module.factory((0, _capitalize2.default)(name), factory.default ? factory.default : factory);
});

@@ -126,6 +125,6 @@ }

var module = _angular2['default'].module(moduleName, []);
var module = _angular2.default.module(moduleName, []);
req.keys().forEach(function (filePath) {
var name = _path2['default'].basename(filePath, _path2['default'].extname(filePath));
var name = _path2.default.basename(filePath, _path2.default.extname(filePath));
if (name === 'index') {

@@ -135,4 +134,5 @@ return;

module.filter(name, req(filePath));
var filter = req(filePath);
module.filter(name, filter.default ? filter.default : filter);
});
}

@@ -1,23 +0,21 @@

var gulp = require('gulp');
var mocha = require('gulp-mocha');
var babel = require('gulp-babel');
import gulp from 'gulp';
import mocha from 'gulp-mocha';
import babel from 'gulp-babel';
gulp.task('test', function () {
gulp.task('test', () => {
return gulp.src('./tests/**/*.js')
.pipe(babel())
.pipe(mocha({
timeout: 20000
timeout: 20000,
}));
});
gulp.task('build', function (callback) {
gulp.task('build', () => {
return gulp.src('./src/**/*.{js,jsx}')
.pipe(babel({
stage: 0
}))
.pipe(gulp.dest("./dist"));
.pipe(babel())
.pipe(gulp.dest('./dist'));
});
gulp.doneCallback = function (err) {
gulp.doneCallback = (err) => {
process.exit(err ? 1 : 0);
};
{
"name": "angular-es6",
"description": "ECMAScript 6 boilerplate for angular source code and webpack",
"version": "2.0.6",
"version": "3.0.1",
"private": false,

@@ -42,17 +42,21 @@ "author": {

"devDependencies": {
"angular": "^1.4.7",
"babel-loader": "^5.4.0",
"babel": "^5.8.34",
"babel-core": "^5.8.34",
"angular": "^1.4.9",
"babel-cli": "^6.4.5",
"babel-core": "^6.4.5",
"babel-eslint": "^4.1.3",
"eslint": "^1.10.1",
"eslint-config-airbnb": "^1.0.0",
"eslint-loader": "^1.1.1",
"eslint-plugin-react": "^3.10.0",
"webpack": "^1.12.8",
"babel-loader": "^6.2.1",
"babel-plugin-transform-class-properties": "^6.4.0",
"babel-preset-es2015": "^6.3.13",
"babel-preset-stage-0": "^6.3.13",
"babel-preset-stage-1": "^6.3.13",
"eslint": "^1.10.3",
"eslint-config-airbnb": "^0.1.1",
"eslint-loader": "^1.2.0",
"eslint-plugin-react": "^3.15.0",
"gulp": "^3.9.0",
"gulp-babel": "^6.1.1",
"gulp-mocha": "^2.1.3",
"gulp-babel": "^5.2.1",
"gulp-util": "^3.0.7",
"should": "^7.1.1"
"should": "^8.1.1",
"webpack": "^1.12.11"
},

@@ -59,0 +63,0 @@ "peerDependencies": {

@@ -11,3 +11,6 @@ # Angular ECMAScript 6 config and boilerplate

## Babel
Use version 2.x for the babel 5 and version 3.x for the babel 6
## Instalation

@@ -14,0 +17,0 @@

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