Installations
npm install babel-plugin-transform-es2015-modules-simple-amd
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
4.4.2
NPM Version
3.8.6
Score
64.2
Supply Chain
87.2
Quality
73.4
Maintenance
25
Vulnerability
99.6
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Developer
finom
Download Statistics
Total Downloads
176,301
Last Day
15
Last Week
69
Last Month
586
Last Year
11,015
GitHub Statistics
26 Stars
26 Commits
12 Forks
4 Watching
1 Branches
2 Contributors
Bundle Size
368.95 kB
Minified
96.61 kB
Minified + Gzipped
Package Meta Information
Latest Version
0.3.0
Package Id
babel-plugin-transform-es2015-modules-simple-amd@0.3.0
Size
2.86 kB
NPM Version
3.8.6
Node Version
4.4.2
Total Downloads
Cumulative downloads
Total Downloads
176,301
Last day
1,400%
15
Compared to previous day
Last week
-17.9%
69
Compared to previous week
Last month
-30.9%
586
Compared to previous month
Last year
31.5%
11,015
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
babel-plugin-transform-es2015-modules-simple-amd
Limited transformer for ECMAScript 2015 modules (AMD)
Converts this code:
1import x from '/path/to/x'; 2import y from '/path/to/y'; 3doSomething(); 4export default x + y;
Into this one:
1define(['/path/to/x', '/path/to/y'], function (x, y) { 2 doSomething(); 3 return x + y; 4});
Instead of this one (generated with babel-plugin-transform-es2015-modules-amd
):
1define(['exports', '/path/to/x', '/path/to/y'], function (exports, _x, _y) {
2 Object.defineProperty(exports, "__esModule", {
3 value: true
4 });
5
6 var _x2 = _interopRequireDefault(_x);
7
8 var _y2 = _interopRequireDefault(_y);
9
10 function _interopRequireDefault(obj) {
11 return obj && obj.__esModule ? obj : {
12 'default': obj
13 };
14 }
15
16 doSomething();
17 exports.default = _x2.default + _y2.default;
18});
Other features (like import x as y from 'X'
or import * from 'X'
etc) aren't supported. Just import VARIABLE from 'PATH'
and import 'PATH'
.
Warning. If no import
or export
are presented in JavaScript file, the plugin does nothing (means it doesn't wrap code with define
).
Installation
1$ npm install --save-dev babel-plugin-transform-es2015-modules-simple-amd
Usage
Via .babelrc
(Recommended)
.babelrc
1{ 2 "plugins": ["transform-es2015-modules-simple-amd"] 3}
Via Node API
1require('babel').transform('code', { 2 plugins: ['transform-es2015-modules-simple-amd'] 3});
Thanks to RReverser.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
Found 1/25 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 2 are checked with a SAST tool
Score
3
/10
Last Scanned on 2025-01-06
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreGathering detailed insights and metrics for babel-plugin-transform-es2015-modules-simple-amd