use directories for structure
This commit is contained in:
@@ -2,7 +2,13 @@
|
||||
|
||||
## Getting ready
|
||||
|
||||
Run `npx http-server` and open `http://localhost:8080/` in your favorite browser!
|
||||
Run `npx -p local-web-server ws` and open `http://localhost:8000/` in your favorite browser!
|
||||
|
||||
## Development notes
|
||||
|
||||
### Generate translations
|
||||
|
||||
Run `npm run generate-translations`
|
||||
|
||||
## Useful links
|
||||
|
||||
|
17
app/about/about.js
Normal file
17
app/about/about.js
Normal file
@@ -0,0 +1,17 @@
|
||||
(function() {
|
||||
// globals
|
||||
MyApp.About = {};
|
||||
|
||||
|
||||
// utility functions
|
||||
|
||||
// app functions
|
||||
MyApp.About.renderAboutPage = function() {
|
||||
$('.js-page-container').html(ejs.rr('/app/about/templates/about.ejs'));
|
||||
};
|
||||
|
||||
// events
|
||||
|
||||
// app startup
|
||||
page('/about', MyApp.About.renderAboutPage);
|
||||
})();
|
11
app/about/templates/about.ejs
Normal file
11
app/about/templates/about.ejs
Normal file
@@ -0,0 +1,11 @@
|
||||
<p>This is the coolest app ever.<p>
|
||||
|
||||
<ul>
|
||||
<li>simple</li>
|
||||
<li>fast</li>
|
||||
<li>easy to understand</li>
|
||||
<li>easy to mantain</li>
|
||||
<li>easy to evolve</li>
|
||||
</ul>
|
||||
|
||||
<p>yay!<p>
|
55
app/index.js
Normal file
55
app/index.js
Normal file
@@ -0,0 +1,55 @@
|
||||
(function() {
|
||||
// globals
|
||||
MyApp.Utils = {};
|
||||
|
||||
// utility functions
|
||||
|
||||
// app functions
|
||||
|
||||
// events
|
||||
|
||||
// app startup
|
||||
|
||||
// set language
|
||||
i18next
|
||||
.use(i18nextBrowserLanguageDetector)
|
||||
.use(i18nextXHRBackend)
|
||||
.init({
|
||||
detection: {
|
||||
order: ['querystring', 'cookie', 'navigator'],
|
||||
lookupQuerystring: 'lang',
|
||||
lookupCookie: 'current-language',
|
||||
caches: ['cookie'],
|
||||
cookieMinutes: 5256000
|
||||
},
|
||||
whitelist: ['en', 'de', 'it'],
|
||||
load: 'languageOnly',
|
||||
fallbackLng: 'it',
|
||||
backend: {
|
||||
loadPath: '/i18n/{{lng}}.json'
|
||||
}
|
||||
})
|
||||
.then(function() {
|
||||
// language initialized
|
||||
// if there is a lang query string parameter, remove it and reload: we save the language in a cookie so the url stays nice
|
||||
var urlQueryString = new URLSearchParams(window.location.search);
|
||||
if (urlQueryString.has('lang')) {
|
||||
urlQueryString.delete('lang');
|
||||
var newUrl = [location.protocol, '//', location.host, location.pathname].join('') +
|
||||
(urlQueryString.toString() !== '' ? '?' + urlQueryString.toString() : '') +
|
||||
window.location.hash;
|
||||
window.location = newUrl;
|
||||
return;
|
||||
}
|
||||
|
||||
// render main shell
|
||||
MyApp.Shell.renderShell()
|
||||
.then(function() {
|
||||
//setup routing
|
||||
page({
|
||||
hashbang: true
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
})();
|
30
app/shell/shell.js
Normal file
30
app/shell/shell.js
Normal file
@@ -0,0 +1,30 @@
|
||||
(function() {
|
||||
// globals
|
||||
MyApp.Shell = {};
|
||||
|
||||
// utility functions
|
||||
|
||||
// app functions
|
||||
MyApp.Shell.renderShell = function() {
|
||||
document.title = i18next.t('vanillaJS');
|
||||
|
||||
var d = $.Deferred();
|
||||
|
||||
//preload this template, so we can be sure the dom in rendered when we resolve
|
||||
ejs.preloadTemplate('/app/shell/templates/main.ejs')
|
||||
.then(function(templateUrl) {
|
||||
$('.js-main-content').html(ejs.rr(templateUrl));
|
||||
d.resolve();
|
||||
});
|
||||
return d;
|
||||
};
|
||||
|
||||
MyApp.Shell.renderHomePage = function() {
|
||||
$('.js-page-container').html(ejs.rr('/app/shell/templates/home.ejs'));
|
||||
};
|
||||
|
||||
// events
|
||||
|
||||
// app startup
|
||||
page('/', MyApp.Shell.renderHomePage);
|
||||
})();
|
8
app/shell/templates/home.ejs
Normal file
8
app/shell/templates/home.ejs
Normal file
@@ -0,0 +1,8 @@
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item">
|
||||
<a href="/text">Here is a page with some example text and something happens when you click</a>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<a href="/about">This is just an about page</a>
|
||||
</li>
|
||||
</ul>
|
12
app/shell/templates/main.ejs
Normal file
12
app/shell/templates/main.ejs
Normal file
@@ -0,0 +1,12 @@
|
||||
<div class="container">
|
||||
<p class="js-language">
|
||||
<a href="?lang=de" target="_self">Deutsch</a> <a href="?lang=it" target="_self">Italiano</a> <a href="?lang=en" target="_self">English</a>
|
||||
</p>
|
||||
|
||||
<div class="alert alert-primary">
|
||||
<h1><%= i18next.t('awesome') %></h1>
|
||||
</div>
|
||||
|
||||
<div class="js-page-container">
|
||||
</div>
|
||||
</div>
|
5
app/text/templates/sometext.ejs
Normal file
5
app/text/templates/sometext.ejs
Normal file
@@ -0,0 +1,5 @@
|
||||
<ul>
|
||||
<% for (var i=0; i<texts.length; i++) { %>
|
||||
<li data-id="<%= texts[i].id %>" class="js-link"><%= texts[i].description %></li>
|
||||
<% } %>
|
||||
</ul>
|
32
app/text/text.js
Normal file
32
app/text/text.js
Normal file
@@ -0,0 +1,32 @@
|
||||
(function() {
|
||||
// globals
|
||||
MyApp.Text = {};
|
||||
|
||||
// utility functions
|
||||
|
||||
// app functions
|
||||
MyApp.Text.renderTextPage = function() {
|
||||
$('.js-page-container').html(ejs.rr('/app/text/templates/sometext.ejs', {
|
||||
texts: [
|
||||
{
|
||||
id: 100,
|
||||
description: 'Some text with id 100'
|
||||
},
|
||||
{
|
||||
id: 200,
|
||||
description: 'Some other text with id 200. Click it!'
|
||||
}
|
||||
]
|
||||
}));
|
||||
};
|
||||
|
||||
// events
|
||||
$(document).on('click', '.js-link', function(ev) {
|
||||
var el = $(ev.currentTarget);
|
||||
var linkId = el.attr('data-id');
|
||||
PNotify.success('The text you clicked had id ' + linkId + '. Maybe next time I will do something with this id.');
|
||||
});
|
||||
|
||||
// app startup
|
||||
page('/text', MyApp.Text.renderTextPage);
|
||||
})();
|
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"vanillaJS": "vanillaJS Beispiel Projekt",
|
||||
"awesome": "Coole app."
|
||||
"vanillaJS": "vanillaJS Beispiel Projekt",
|
||||
"awesome": "Coole app."
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"vanillaJS": "vanillaJS seed project",
|
||||
"awesome": "This is an awesome app!"
|
||||
"vanillaJS": "vanillaJS seed project",
|
||||
"awesome": "This is an awesome app!"
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"vanillaJS": "progetto di esempio vanillaJS",
|
||||
"awesome": "Questa app è fantastica!"
|
||||
"vanillaJS": "progetto di esempio vanillaJS",
|
||||
"awesome": "Questa app è fantastica!"
|
||||
}
|
||||
|
47
i18next-scanner.config.js
Normal file
47
i18next-scanner.config.js
Normal file
@@ -0,0 +1,47 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
|
||||
module.exports = {
|
||||
input: [
|
||||
'src/**/*.{js,ejs}'
|
||||
],
|
||||
output: './',
|
||||
options: {
|
||||
debug: false,
|
||||
func: {
|
||||
list: ['i18next.t', 'i18n.t', 'this.i18n.tr'],
|
||||
extensions: ['.js', '.ejs']
|
||||
},
|
||||
lngs: ['en', 'it', 'de'],
|
||||
ns: [
|
||||
'translation'
|
||||
],
|
||||
defaultLng: 'en',
|
||||
defaultNs: 'translation',
|
||||
resource: {
|
||||
loadPath: 'i18n/{{lng}}.json',
|
||||
savePath: 'i18n/{{lng}}.json',
|
||||
jsonIndent: 4,
|
||||
lineEnding: '\n'
|
||||
},
|
||||
nsSeparator: false, // namespace separator
|
||||
keySeparator: false, // key separator
|
||||
interpolation: {
|
||||
prefix: '{{',
|
||||
suffix: '}}'
|
||||
},
|
||||
removeUnusedKeys: true
|
||||
},
|
||||
transform: function customTransform(file, enc, done) {
|
||||
const {ext} = path.parse(file.path);
|
||||
const content = fs.readFileSync(file.path, enc);
|
||||
if (ext === '.js' || ext === '.ejs') {
|
||||
let p = this.parser;
|
||||
p.parseFuncFromString(content, function(key) {
|
||||
p.set(key, '⚠ ' + key + ' ⚠');
|
||||
});
|
||||
}
|
||||
done();
|
||||
}
|
||||
};
|
@@ -27,7 +27,12 @@
|
||||
<script type="text/javascript" src="node_modules/ejs/ejs.js"></script>
|
||||
<script type="text/javascript" src="node_modules/ejs-render-remote/ejs-render-remote.js"></script>
|
||||
|
||||
<script type="text/javascript" src="js/config.js"></script>
|
||||
<script type="text/javascript" src="js/index.js"></script>
|
||||
<script type="text/javascript" src="app/config.js"></script>
|
||||
|
||||
<script type="text/javascript" src="app/shell/shell.js"></script>
|
||||
<script type="text/javascript" src="app/about/about.js"></script>
|
||||
<script type="text/javascript" src="app/text/text.js"></script>
|
||||
|
||||
<script type="text/javascript" src="app/index.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
104
js/index.js
104
js/index.js
@@ -1,104 +0,0 @@
|
||||
(function() {
|
||||
// globals
|
||||
MyApp.Utils = {};
|
||||
|
||||
|
||||
// utility functions
|
||||
// MyApp.Utils.someUtilityFunction = function() {}
|
||||
// MyApp.Utils.someOtherUtilityFunction = function() {}
|
||||
|
||||
// app functions
|
||||
MyApp.renderShell = function() {
|
||||
document.title = i18next.t('vanillaJS');
|
||||
|
||||
var d = $.Deferred();
|
||||
|
||||
//preload this template, so we can be sure the dom in rendered when we resolve
|
||||
ejs.preloadTemplate('/templates/main.ejs')
|
||||
.then(function(templateUrl) {
|
||||
$('.js-main-content').html(ejs.rr(templateUrl));
|
||||
d.resolve();
|
||||
});
|
||||
return d;
|
||||
};
|
||||
|
||||
MyApp.renderHomePage = function() {
|
||||
$('.js-page-container').html(ejs.rr('/templates/home.ejs'));
|
||||
};
|
||||
|
||||
MyApp.renderTextPage = function() {
|
||||
$('.js-page-container').html(ejs.rr('/templates/sometext.ejs', {
|
||||
texts: [
|
||||
{
|
||||
id: 100,
|
||||
description: 'Some text with id 100'
|
||||
},
|
||||
{
|
||||
id: 200,
|
||||
description: 'Some other text with id 200. Click it!'
|
||||
}
|
||||
]
|
||||
}));
|
||||
};
|
||||
|
||||
MyApp.renderAboutPage = function() {
|
||||
$('.js-page-container').html(ejs.rr('/templates/about.ejs'));
|
||||
};
|
||||
|
||||
// events
|
||||
$(document).on('click', '.js-link', function(ev) {
|
||||
var el = $(ev.currentTarget);
|
||||
var linkId = el.attr('data-id');
|
||||
PNotify.success('The text you clicked had id ' + linkId + '. Maybe next time I will do something with this id.');
|
||||
});
|
||||
|
||||
|
||||
// app startup
|
||||
|
||||
// set language
|
||||
i18next
|
||||
.use(i18nextBrowserLanguageDetector)
|
||||
.use(i18nextXHRBackend)
|
||||
.init({
|
||||
detection: {
|
||||
order: ['querystring', 'cookie', 'navigator'],
|
||||
lookupQuerystring: 'lang',
|
||||
lookupCookie: 'current-language',
|
||||
caches: ['cookie'],
|
||||
cookieMinutes: 5256000
|
||||
},
|
||||
whitelist: ['en', 'de', 'it'],
|
||||
load: 'languageOnly',
|
||||
fallbackLng: 'it',
|
||||
backend: {
|
||||
loadPath: '/i18n/{{lng}}.json'
|
||||
}
|
||||
})
|
||||
.then(function() {
|
||||
// language initialized
|
||||
// if there is a lang query string parameter, remove it and reload: we save the language in a cookie so the url stays nice
|
||||
var urlQueryString = new URLSearchParams(window.location.search);
|
||||
if (urlQueryString.has('lang')) {
|
||||
urlQueryString.delete('lang');
|
||||
var newUrl = [location.protocol, '//', location.host, location.pathname].join('') +
|
||||
(urlQueryString.toString() !== '' ? '?' + urlQueryString.toString() : '') +
|
||||
window.location.hash;
|
||||
window.location = newUrl;
|
||||
return;
|
||||
}
|
||||
|
||||
// render main shell
|
||||
MyApp.renderShell()
|
||||
.then(function() {
|
||||
//setup routing
|
||||
page('/', MyApp.renderHomePage);
|
||||
page('/about', MyApp.renderAboutPage);
|
||||
page('/text', MyApp.renderTextPage);
|
||||
|
||||
page({
|
||||
hashbang: true
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
})();
|
16
node_modules/.bin/acorn
generated
vendored
16
node_modules/.bin/acorn
generated
vendored
@@ -1 +1,15 @@
|
||||
../acorn/bin/acorn
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
"$basedir/node" "$basedir/../acorn/bin/acorn" "$@"
|
||||
ret=$?
|
||||
else
|
||||
node "$basedir/../acorn/bin/acorn" "$@"
|
||||
ret=$?
|
||||
fi
|
||||
exit $ret
|
||||
|
22
node_modules/.bin/acorn.cmd
generated
vendored
22
node_modules/.bin/acorn.cmd
generated
vendored
@@ -1,7 +1,17 @@
|
||||
@IF EXIST "%~dp0\node.exe" (
|
||||
"%~dp0\node.exe" "%~dp0\..\acorn\bin\acorn" %*
|
||||
@ECHO off
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
@SETLOCAL
|
||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
node "%~dp0\..\acorn\bin\acorn" %*
|
||||
)
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
"%_prog%" "%dp0%\..\acorn\bin\acorn" %*
|
||||
ENDLOCAL
|
||||
EXIT /b %errorlevel%
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
|
18
node_modules/.bin/acorn.ps1
generated
vendored
Normal file
18
node_modules/.bin/acorn.ps1
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
& "$basedir/node$exe" "$basedir/../acorn/bin/acorn" $args
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
& "node$exe" "$basedir/../acorn/bin/acorn" $args
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
16
node_modules/.bin/css-b64-images
generated
vendored
16
node_modules/.bin/css-b64-images
generated
vendored
@@ -1 +1,15 @@
|
||||
../css-b64-images/bin/css-b64-images
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
"$basedir/node" "$basedir/../css-b64-images/bin/css-b64-images" "$@"
|
||||
ret=$?
|
||||
else
|
||||
node "$basedir/../css-b64-images/bin/css-b64-images" "$@"
|
||||
ret=$?
|
||||
fi
|
||||
exit $ret
|
||||
|
22
node_modules/.bin/css-b64-images.cmd
generated
vendored
22
node_modules/.bin/css-b64-images.cmd
generated
vendored
@@ -1,7 +1,17 @@
|
||||
@IF EXIST "%~dp0\node.exe" (
|
||||
"%~dp0\node.exe" "%~dp0\..\css-b64-images\bin\css-b64-images" %*
|
||||
@ECHO off
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
@SETLOCAL
|
||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
node "%~dp0\..\css-b64-images\bin\css-b64-images" %*
|
||||
)
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
"%_prog%" "%dp0%\..\css-b64-images\bin\css-b64-images" %*
|
||||
ENDLOCAL
|
||||
EXIT /b %errorlevel%
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
|
18
node_modules/.bin/css-b64-images.ps1
generated
vendored
Normal file
18
node_modules/.bin/css-b64-images.ps1
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
& "$basedir/node$exe" "$basedir/../css-b64-images/bin/css-b64-images" $args
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
& "node$exe" "$basedir/../css-b64-images/bin/css-b64-images" $args
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
16
node_modules/.bin/escodegen
generated
vendored
16
node_modules/.bin/escodegen
generated
vendored
@@ -1 +1,15 @@
|
||||
../escodegen/bin/escodegen.js
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
"$basedir/node" "$basedir/../escodegen/bin/escodegen.js" "$@"
|
||||
ret=$?
|
||||
else
|
||||
node "$basedir/../escodegen/bin/escodegen.js" "$@"
|
||||
ret=$?
|
||||
fi
|
||||
exit $ret
|
||||
|
22
node_modules/.bin/escodegen.cmd
generated
vendored
22
node_modules/.bin/escodegen.cmd
generated
vendored
@@ -1,7 +1,17 @@
|
||||
@IF EXIST "%~dp0\node.exe" (
|
||||
"%~dp0\node.exe" "%~dp0\..\escodegen\bin\escodegen.js" %*
|
||||
@ECHO off
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
@SETLOCAL
|
||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
node "%~dp0\..\escodegen\bin\escodegen.js" %*
|
||||
)
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
"%_prog%" "%dp0%\..\escodegen\bin\escodegen.js" %*
|
||||
ENDLOCAL
|
||||
EXIT /b %errorlevel%
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
|
18
node_modules/.bin/escodegen.ps1
generated
vendored
Normal file
18
node_modules/.bin/escodegen.ps1
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
& "$basedir/node$exe" "$basedir/../escodegen/bin/escodegen.js" $args
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
& "node$exe" "$basedir/../escodegen/bin/escodegen.js" $args
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
16
node_modules/.bin/esgenerate
generated
vendored
16
node_modules/.bin/esgenerate
generated
vendored
@@ -1 +1,15 @@
|
||||
../escodegen/bin/esgenerate.js
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
"$basedir/node" "$basedir/../escodegen/bin/esgenerate.js" "$@"
|
||||
ret=$?
|
||||
else
|
||||
node "$basedir/../escodegen/bin/esgenerate.js" "$@"
|
||||
ret=$?
|
||||
fi
|
||||
exit $ret
|
||||
|
22
node_modules/.bin/esgenerate.cmd
generated
vendored
22
node_modules/.bin/esgenerate.cmd
generated
vendored
@@ -1,7 +1,17 @@
|
||||
@IF EXIST "%~dp0\node.exe" (
|
||||
"%~dp0\node.exe" "%~dp0\..\escodegen\bin\esgenerate.js" %*
|
||||
@ECHO off
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
@SETLOCAL
|
||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
node "%~dp0\..\escodegen\bin\esgenerate.js" %*
|
||||
)
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
"%_prog%" "%dp0%\..\escodegen\bin\esgenerate.js" %*
|
||||
ENDLOCAL
|
||||
EXIT /b %errorlevel%
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
|
18
node_modules/.bin/esgenerate.ps1
generated
vendored
Normal file
18
node_modules/.bin/esgenerate.ps1
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
& "$basedir/node$exe" "$basedir/../escodegen/bin/esgenerate.js" $args
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
& "node$exe" "$basedir/../escodegen/bin/esgenerate.js" $args
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
16
node_modules/.bin/esparse
generated
vendored
16
node_modules/.bin/esparse
generated
vendored
@@ -1 +1,15 @@
|
||||
../esprima/bin/esparse.js
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
"$basedir/node" "$basedir/../esprima/bin/esparse.js" "$@"
|
||||
ret=$?
|
||||
else
|
||||
node "$basedir/../esprima/bin/esparse.js" "$@"
|
||||
ret=$?
|
||||
fi
|
||||
exit $ret
|
||||
|
22
node_modules/.bin/esparse.cmd
generated
vendored
22
node_modules/.bin/esparse.cmd
generated
vendored
@@ -1,7 +1,17 @@
|
||||
@IF EXIST "%~dp0\node.exe" (
|
||||
"%~dp0\node.exe" "%~dp0\..\esprima\bin\esparse.js" %*
|
||||
@ECHO off
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
@SETLOCAL
|
||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
node "%~dp0\..\esprima\bin\esparse.js" %*
|
||||
)
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
"%_prog%" "%dp0%\..\esprima\bin\esparse.js" %*
|
||||
ENDLOCAL
|
||||
EXIT /b %errorlevel%
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
|
18
node_modules/.bin/esparse.ps1
generated
vendored
Normal file
18
node_modules/.bin/esparse.ps1
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
& "$basedir/node$exe" "$basedir/../esprima/bin/esparse.js" $args
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
& "node$exe" "$basedir/../esprima/bin/esparse.js" $args
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
16
node_modules/.bin/esvalidate
generated
vendored
16
node_modules/.bin/esvalidate
generated
vendored
@@ -1 +1,15 @@
|
||||
../esprima/bin/esvalidate.js
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
"$basedir/node" "$basedir/../esprima/bin/esvalidate.js" "$@"
|
||||
ret=$?
|
||||
else
|
||||
node "$basedir/../esprima/bin/esvalidate.js" "$@"
|
||||
ret=$?
|
||||
fi
|
||||
exit $ret
|
||||
|
22
node_modules/.bin/esvalidate.cmd
generated
vendored
22
node_modules/.bin/esvalidate.cmd
generated
vendored
@@ -1,7 +1,17 @@
|
||||
@IF EXIST "%~dp0\node.exe" (
|
||||
"%~dp0\node.exe" "%~dp0\..\esprima\bin\esvalidate.js" %*
|
||||
@ECHO off
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
@SETLOCAL
|
||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
node "%~dp0\..\esprima\bin\esvalidate.js" %*
|
||||
)
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
"%_prog%" "%dp0%\..\esprima\bin\esvalidate.js" %*
|
||||
ENDLOCAL
|
||||
EXIT /b %errorlevel%
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
|
18
node_modules/.bin/esvalidate.ps1
generated
vendored
Normal file
18
node_modules/.bin/esvalidate.ps1
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
& "$basedir/node$exe" "$basedir/../esprima/bin/esvalidate.js" $args
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
& "node$exe" "$basedir/../esprima/bin/esvalidate.js" $args
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
16
node_modules/.bin/he
generated
vendored
16
node_modules/.bin/he
generated
vendored
@@ -1 +1,15 @@
|
||||
../he/bin/he
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
"$basedir/node" "$basedir/../he/bin/he" "$@"
|
||||
ret=$?
|
||||
else
|
||||
node "$basedir/../he/bin/he" "$@"
|
||||
ret=$?
|
||||
fi
|
||||
exit $ret
|
||||
|
22
node_modules/.bin/he.cmd
generated
vendored
22
node_modules/.bin/he.cmd
generated
vendored
@@ -1,7 +1,17 @@
|
||||
@IF EXIST "%~dp0\node.exe" (
|
||||
"%~dp0\node.exe" "%~dp0\..\he\bin\he" %*
|
||||
@ECHO off
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
@SETLOCAL
|
||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
node "%~dp0\..\he\bin\he" %*
|
||||
)
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
"%_prog%" "%dp0%\..\he\bin\he" %*
|
||||
ENDLOCAL
|
||||
EXIT /b %errorlevel%
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
|
18
node_modules/.bin/he.ps1
generated
vendored
Normal file
18
node_modules/.bin/he.ps1
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
& "$basedir/node$exe" "$basedir/../he/bin/he" $args
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
& "node$exe" "$basedir/../he/bin/he" $args
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
16
node_modules/.bin/html-minifier
generated
vendored
16
node_modules/.bin/html-minifier
generated
vendored
@@ -1 +1,15 @@
|
||||
../html-minifier/cli.js
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
"$basedir/node" "$basedir/../html-minifier/cli.js" "$@"
|
||||
ret=$?
|
||||
else
|
||||
node "$basedir/../html-minifier/cli.js" "$@"
|
||||
ret=$?
|
||||
fi
|
||||
exit $ret
|
||||
|
22
node_modules/.bin/html-minifier.cmd
generated
vendored
22
node_modules/.bin/html-minifier.cmd
generated
vendored
@@ -1,7 +1,17 @@
|
||||
@IF EXIST "%~dp0\node.exe" (
|
||||
"%~dp0\node.exe" "%~dp0\..\html-minifier\cli.js" %*
|
||||
@ECHO off
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
@SETLOCAL
|
||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
node "%~dp0\..\html-minifier\cli.js" %*
|
||||
)
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
"%_prog%" "%dp0%\..\html-minifier\cli.js" %*
|
||||
ENDLOCAL
|
||||
EXIT /b %errorlevel%
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
|
18
node_modules/.bin/html-minifier.ps1
generated
vendored
Normal file
18
node_modules/.bin/html-minifier.ps1
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
& "$basedir/node$exe" "$basedir/../html-minifier/cli.js" $args
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
& "node$exe" "$basedir/../html-minifier/cli.js" $args
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
15
node_modules/.bin/i18next-scanner
generated
vendored
Normal file
15
node_modules/.bin/i18next-scanner
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
"$basedir/node" "$basedir/../i18next-scanner/bin/cli.js" "$@"
|
||||
ret=$?
|
||||
else
|
||||
node "$basedir/../i18next-scanner/bin/cli.js" "$@"
|
||||
ret=$?
|
||||
fi
|
||||
exit $ret
|
17
node_modules/.bin/i18next-scanner.cmd
generated
vendored
Normal file
17
node_modules/.bin/i18next-scanner.cmd
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
@ECHO off
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
"%_prog%" "%dp0%\..\i18next-scanner\bin\cli.js" %*
|
||||
ENDLOCAL
|
||||
EXIT /b %errorlevel%
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
18
node_modules/.bin/i18next-scanner.ps1
generated
vendored
Normal file
18
node_modules/.bin/i18next-scanner.ps1
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
& "$basedir/node$exe" "$basedir/../i18next-scanner/bin/cli.js" $args
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
& "node$exe" "$basedir/../i18next-scanner/bin/cli.js" $args
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
16
node_modules/.bin/minify
generated
vendored
16
node_modules/.bin/minify
generated
vendored
@@ -1 +1,15 @@
|
||||
../minify/bin/minify.js
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
"$basedir/node" "$basedir/../minify/bin/minify.js" "$@"
|
||||
ret=$?
|
||||
else
|
||||
node "$basedir/../minify/bin/minify.js" "$@"
|
||||
ret=$?
|
||||
fi
|
||||
exit $ret
|
||||
|
22
node_modules/.bin/minify.cmd
generated
vendored
22
node_modules/.bin/minify.cmd
generated
vendored
@@ -1,7 +1,17 @@
|
||||
@IF EXIST "%~dp0\node.exe" (
|
||||
"%~dp0\node.exe" "%~dp0\..\minify\bin\minify.js" %*
|
||||
@ECHO off
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
@SETLOCAL
|
||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
node "%~dp0\..\minify\bin\minify.js" %*
|
||||
)
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
"%_prog%" "%dp0%\..\minify\bin\minify.js" %*
|
||||
ENDLOCAL
|
||||
EXIT /b %errorlevel%
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
|
18
node_modules/.bin/minify.ps1
generated
vendored
Normal file
18
node_modules/.bin/minify.ps1
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
& "$basedir/node$exe" "$basedir/../minify/bin/minify.js" $args
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
& "node$exe" "$basedir/../minify/bin/minify.js" $args
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
10
node_modules/.bin/minifyfromhtml
generated
vendored
10
node_modules/.bin/minifyfromhtml
generated
vendored
@@ -1 +1,9 @@
|
||||
../minifyfromhtml/minifyfromhtml.js
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
"$basedir/../minifyfromhtml/minifyfromhtml.js" "$@"
|
||||
exit $?
|
||||
|
10
node_modules/.bin/minifyfromhtml.cmd
generated
vendored
10
node_modules/.bin/minifyfromhtml.cmd
generated
vendored
@@ -1 +1,9 @@
|
||||
@"%~dp0\..\minifyfromhtml\minifyfromhtml.js" %*
|
||||
@ECHO off
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
"%dp0%\..\minifyfromhtml\minifyfromhtml.js" %*
|
||||
ENDLOCAL
|
||||
EXIT /b %errorlevel%
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
|
11
node_modules/.bin/minifyfromhtml.ps1
generated
vendored
Normal file
11
node_modules/.bin/minifyfromhtml.ps1
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
& "$basedir/../minifyfromhtml/minifyfromhtml.js" $args
|
||||
exit $LASTEXITCODE
|
15
node_modules/.bin/semver
generated
vendored
Normal file
15
node_modules/.bin/semver
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
"$basedir/node" "$basedir/../semver/bin/semver.js" "$@"
|
||||
ret=$?
|
||||
else
|
||||
node "$basedir/../semver/bin/semver.js" "$@"
|
||||
ret=$?
|
||||
fi
|
||||
exit $ret
|
17
node_modules/.bin/semver.cmd
generated
vendored
Normal file
17
node_modules/.bin/semver.cmd
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
@ECHO off
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
"%_prog%" "%dp0%\..\semver\bin\semver.js" %*
|
||||
ENDLOCAL
|
||||
EXIT /b %errorlevel%
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
18
node_modules/.bin/semver.ps1
generated
vendored
Normal file
18
node_modules/.bin/semver.ps1
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
& "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
& "node$exe" "$basedir/../semver/bin/semver.js" $args
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
16
node_modules/.bin/sshpk-conv
generated
vendored
16
node_modules/.bin/sshpk-conv
generated
vendored
@@ -1 +1,15 @@
|
||||
../sshpk/bin/sshpk-conv
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
"$basedir/node" "$basedir/../sshpk/bin/sshpk-conv" "$@"
|
||||
ret=$?
|
||||
else
|
||||
node "$basedir/../sshpk/bin/sshpk-conv" "$@"
|
||||
ret=$?
|
||||
fi
|
||||
exit $ret
|
||||
|
22
node_modules/.bin/sshpk-conv.cmd
generated
vendored
22
node_modules/.bin/sshpk-conv.cmd
generated
vendored
@@ -1,7 +1,17 @@
|
||||
@IF EXIST "%~dp0\node.exe" (
|
||||
"%~dp0\node.exe" "%~dp0\..\sshpk\bin\sshpk-conv" %*
|
||||
@ECHO off
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
@SETLOCAL
|
||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
node "%~dp0\..\sshpk\bin\sshpk-conv" %*
|
||||
)
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
"%_prog%" "%dp0%\..\sshpk\bin\sshpk-conv" %*
|
||||
ENDLOCAL
|
||||
EXIT /b %errorlevel%
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
|
18
node_modules/.bin/sshpk-conv.ps1
generated
vendored
Normal file
18
node_modules/.bin/sshpk-conv.ps1
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
& "$basedir/node$exe" "$basedir/../sshpk/bin/sshpk-conv" $args
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
& "node$exe" "$basedir/../sshpk/bin/sshpk-conv" $args
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
16
node_modules/.bin/sshpk-sign
generated
vendored
16
node_modules/.bin/sshpk-sign
generated
vendored
@@ -1 +1,15 @@
|
||||
../sshpk/bin/sshpk-sign
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
"$basedir/node" "$basedir/../sshpk/bin/sshpk-sign" "$@"
|
||||
ret=$?
|
||||
else
|
||||
node "$basedir/../sshpk/bin/sshpk-sign" "$@"
|
||||
ret=$?
|
||||
fi
|
||||
exit $ret
|
||||
|
22
node_modules/.bin/sshpk-sign.cmd
generated
vendored
22
node_modules/.bin/sshpk-sign.cmd
generated
vendored
@@ -1,7 +1,17 @@
|
||||
@IF EXIST "%~dp0\node.exe" (
|
||||
"%~dp0\node.exe" "%~dp0\..\sshpk\bin\sshpk-sign" %*
|
||||
@ECHO off
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
@SETLOCAL
|
||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
node "%~dp0\..\sshpk\bin\sshpk-sign" %*
|
||||
)
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
"%_prog%" "%dp0%\..\sshpk\bin\sshpk-sign" %*
|
||||
ENDLOCAL
|
||||
EXIT /b %errorlevel%
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
|
18
node_modules/.bin/sshpk-sign.ps1
generated
vendored
Normal file
18
node_modules/.bin/sshpk-sign.ps1
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
& "$basedir/node$exe" "$basedir/../sshpk/bin/sshpk-sign" $args
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
& "node$exe" "$basedir/../sshpk/bin/sshpk-sign" $args
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
16
node_modules/.bin/sshpk-verify
generated
vendored
16
node_modules/.bin/sshpk-verify
generated
vendored
@@ -1 +1,15 @@
|
||||
../sshpk/bin/sshpk-verify
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
"$basedir/node" "$basedir/../sshpk/bin/sshpk-verify" "$@"
|
||||
ret=$?
|
||||
else
|
||||
node "$basedir/../sshpk/bin/sshpk-verify" "$@"
|
||||
ret=$?
|
||||
fi
|
||||
exit $ret
|
||||
|
22
node_modules/.bin/sshpk-verify.cmd
generated
vendored
22
node_modules/.bin/sshpk-verify.cmd
generated
vendored
@@ -1,7 +1,17 @@
|
||||
@IF EXIST "%~dp0\node.exe" (
|
||||
"%~dp0\node.exe" "%~dp0\..\sshpk\bin\sshpk-verify" %*
|
||||
@ECHO off
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
@SETLOCAL
|
||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
node "%~dp0\..\sshpk\bin\sshpk-verify" %*
|
||||
)
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
"%_prog%" "%dp0%\..\sshpk\bin\sshpk-verify" %*
|
||||
ENDLOCAL
|
||||
EXIT /b %errorlevel%
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
|
18
node_modules/.bin/sshpk-verify.ps1
generated
vendored
Normal file
18
node_modules/.bin/sshpk-verify.ps1
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
& "$basedir/node$exe" "$basedir/../sshpk/bin/sshpk-verify" $args
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
& "node$exe" "$basedir/../sshpk/bin/sshpk-verify" $args
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
16
node_modules/.bin/terser
generated
vendored
16
node_modules/.bin/terser
generated
vendored
@@ -1 +1,15 @@
|
||||
../terser/bin/terser
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
"$basedir/node" "$basedir/../terser/bin/terser" "$@"
|
||||
ret=$?
|
||||
else
|
||||
node "$basedir/../terser/bin/terser" "$@"
|
||||
ret=$?
|
||||
fi
|
||||
exit $ret
|
||||
|
22
node_modules/.bin/terser.cmd
generated
vendored
22
node_modules/.bin/terser.cmd
generated
vendored
@@ -1,7 +1,17 @@
|
||||
@IF EXIST "%~dp0\node.exe" (
|
||||
"%~dp0\node.exe" "%~dp0\..\terser\bin\uglifyjs" %*
|
||||
@ECHO off
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
@SETLOCAL
|
||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
node "%~dp0\..\terser\bin\uglifyjs" %*
|
||||
)
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
"%_prog%" "%dp0%\..\terser\bin\terser" %*
|
||||
ENDLOCAL
|
||||
EXIT /b %errorlevel%
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
|
18
node_modules/.bin/terser.ps1
generated
vendored
Normal file
18
node_modules/.bin/terser.ps1
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
& "$basedir/node$exe" "$basedir/../terser/bin/terser" $args
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
& "node$exe" "$basedir/../terser/bin/terser" $args
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
16
node_modules/.bin/uglifyjs
generated
vendored
16
node_modules/.bin/uglifyjs
generated
vendored
@@ -1 +1,15 @@
|
||||
../uglify-js/bin/uglifyjs
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
"$basedir/node" "$basedir/../uglify-js/bin/uglifyjs" "$@"
|
||||
ret=$?
|
||||
else
|
||||
node "$basedir/../uglify-js/bin/uglifyjs" "$@"
|
||||
ret=$?
|
||||
fi
|
||||
exit $ret
|
||||
|
22
node_modules/.bin/uglifyjs.cmd
generated
vendored
22
node_modules/.bin/uglifyjs.cmd
generated
vendored
@@ -1,7 +1,17 @@
|
||||
@IF EXIST "%~dp0\node.exe" (
|
||||
"%~dp0\node.exe" "%~dp0\..\uglify-js\bin\uglifyjs" %*
|
||||
@ECHO off
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
@SETLOCAL
|
||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
node "%~dp0\..\uglify-js\bin\uglifyjs" %*
|
||||
)
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
"%_prog%" "%dp0%\..\uglify-js\bin\uglifyjs" %*
|
||||
ENDLOCAL
|
||||
EXIT /b %errorlevel%
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
|
18
node_modules/.bin/uglifyjs.ps1
generated
vendored
Normal file
18
node_modules/.bin/uglifyjs.ps1
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
& "$basedir/node$exe" "$basedir/../uglify-js/bin/uglifyjs" $args
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
& "node$exe" "$basedir/../uglify-js/bin/uglifyjs" $args
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
16
node_modules/.bin/uuid
generated
vendored
16
node_modules/.bin/uuid
generated
vendored
@@ -1 +1,15 @@
|
||||
../uuid/bin/uuid
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
"$basedir/node" "$basedir/../uuid/bin/uuid" "$@"
|
||||
ret=$?
|
||||
else
|
||||
node "$basedir/../uuid/bin/uuid" "$@"
|
||||
ret=$?
|
||||
fi
|
||||
exit $ret
|
||||
|
22
node_modules/.bin/uuid.cmd
generated
vendored
22
node_modules/.bin/uuid.cmd
generated
vendored
@@ -1,7 +1,17 @@
|
||||
@IF EXIST "%~dp0\node.exe" (
|
||||
"%~dp0\node.exe" "%~dp0\..\uuid\bin\uuid" %*
|
||||
@ECHO off
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
@SETLOCAL
|
||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
node "%~dp0\..\uuid\bin\uuid" %*
|
||||
)
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
"%_prog%" "%dp0%\..\uuid\bin\uuid" %*
|
||||
ENDLOCAL
|
||||
EXIT /b %errorlevel%
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
|
18
node_modules/.bin/uuid.ps1
generated
vendored
Normal file
18
node_modules/.bin/uuid.ps1
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
& "$basedir/node$exe" "$basedir/../uuid/bin/uuid" $args
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
& "node$exe" "$basedir/../uuid/bin/uuid" $args
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
23
node_modules/@babel/runtime/package.json
generated
vendored
23
node_modules/@babel/runtime/package.json
generated
vendored
@@ -1,28 +1,33 @@
|
||||
{
|
||||
"_from": "@babel/runtime@^7.3.1",
|
||||
"_args": [
|
||||
[
|
||||
"@babel/runtime@7.7.7",
|
||||
"D:\\Projects\\siag\\vanillajs-seed"
|
||||
]
|
||||
],
|
||||
"_from": "@babel/runtime@7.7.7",
|
||||
"_id": "@babel/runtime@7.7.7",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-uCnC2JEVAu8AKB5do1WRIsvrdJ0flYx/A/9f/6chdacnEZ7LmavjdsDXr5ksYBegxtuTPR5Va9/+13QF/kFkCA==",
|
||||
"_location": "/@babel/runtime",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "@babel/runtime@^7.3.1",
|
||||
"raw": "@babel/runtime@7.7.7",
|
||||
"name": "@babel/runtime",
|
||||
"escapedName": "@babel%2fruntime",
|
||||
"scope": "@babel",
|
||||
"rawSpec": "^7.3.1",
|
||||
"rawSpec": "7.7.7",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^7.3.1"
|
||||
"fetchSpec": "7.7.7"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/i18next"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.7.7.tgz",
|
||||
"_shasum": "194769ca8d6d7790ec23605af9ee3e42a0aa79cf",
|
||||
"_spec": "@babel/runtime@^7.3.1",
|
||||
"_where": "/home/s2/Code/vanillajs-seed/node_modules/i18next",
|
||||
"_spec": "7.7.7",
|
||||
"_where": "D:\\Projects\\siag\\vanillajs-seed",
|
||||
"author": {
|
||||
"name": "Sebastian McKenzie",
|
||||
"email": "sebmck@gmail.com"
|
||||
@@ -30,11 +35,9 @@
|
||||
"bugs": {
|
||||
"url": "https://github.com/babel/babel/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"regenerator-runtime": "^0.13.2"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "babel's modular runtime helpers",
|
||||
"devDependencies": {
|
||||
"@babel/helpers": "^7.7.4"
|
||||
|
4
node_modules/@ungap/url-search-params/package.json
generated
vendored
4
node_modules/@ungap/url-search-params/package.json
generated
vendored
@@ -2,7 +2,7 @@
|
||||
"_args": [
|
||||
[
|
||||
"@ungap/url-search-params@0.1.4",
|
||||
"/home/s2/Code/vanillajs-seed"
|
||||
"D:\\Projects\\siag\\vanillajs-seed"
|
||||
]
|
||||
],
|
||||
"_from": "@ungap/url-search-params@0.1.4",
|
||||
@@ -27,7 +27,7 @@
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/@ungap/url-search-params/-/url-search-params-0.1.4.tgz",
|
||||
"_spec": "0.1.4",
|
||||
"_where": "/home/s2/Code/vanillajs-seed",
|
||||
"_where": "D:\\Projects\\siag\\vanillajs-seed",
|
||||
"author": {
|
||||
"name": "Andrea Giammarchi"
|
||||
},
|
||||
|
24
node_modules/abab/package.json
generated
vendored
24
node_modules/abab/package.json
generated
vendored
@@ -1,28 +1,34 @@
|
||||
{
|
||||
"_from": "abab@^2.0.0",
|
||||
"_args": [
|
||||
[
|
||||
"abab@2.0.3",
|
||||
"D:\\Projects\\siag\\vanillajs-seed"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
"_from": "abab@2.0.3",
|
||||
"_id": "abab@2.0.3",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-tsFzPpcttalNjFBCFMqsKYQcWxxen1pgJR56by//QwvJc4/OUS3kPOOttx2tSIfjsylB0pYu7f5D3K1RCxUnUg==",
|
||||
"_location": "/abab",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "abab@^2.0.0",
|
||||
"raw": "abab@2.0.3",
|
||||
"name": "abab",
|
||||
"escapedName": "abab",
|
||||
"rawSpec": "^2.0.0",
|
||||
"rawSpec": "2.0.3",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^2.0.0"
|
||||
"fetchSpec": "2.0.3"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/data-urls",
|
||||
"/jsdom"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/abab/-/abab-2.0.3.tgz",
|
||||
"_shasum": "623e2075e02eb2d3f2475e49f99c91846467907a",
|
||||
"_spec": "abab@^2.0.0",
|
||||
"_where": "/home/s2/Code/vanillajs-seed/node_modules/jsdom",
|
||||
"_spec": "2.0.3",
|
||||
"_where": "D:\\Projects\\siag\\vanillajs-seed",
|
||||
"author": {
|
||||
"name": "Jeff Carpenter",
|
||||
"email": "gcarpenterv@gmail.com"
|
||||
@@ -30,8 +36,6 @@
|
||||
"bugs": {
|
||||
"url": "https://github.com/jsdom/abab/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"description": "WHATWG spec-compliant implementations of window.atob and window.btoa.",
|
||||
"devDependencies": {
|
||||
"eslint": "^4.19.1",
|
||||
|
295
node_modules/acorn-bigint/.eslintrc.json
generated
vendored
Normal file
295
node_modules/acorn-bigint/.eslintrc.json
generated
vendored
Normal file
@@ -0,0 +1,295 @@
|
||||
{
|
||||
"env": {
|
||||
"es6": true,
|
||||
"node": true
|
||||
},
|
||||
"globals": { "BigInt": false },
|
||||
"extends": ["eslint:recommended", "plugin:node/recommended"],
|
||||
"plugins": ["node"],
|
||||
"rules": {
|
||||
"accessor-pairs": "error",
|
||||
"array-bracket-newline": "off",
|
||||
"array-bracket-spacing": "off",
|
||||
"array-callback-return": "error",
|
||||
"array-element-newline": "off",
|
||||
"arrow-body-style": "error",
|
||||
"arrow-parens": [
|
||||
"error",
|
||||
"as-needed"
|
||||
],
|
||||
"arrow-spacing": [
|
||||
"error",
|
||||
{
|
||||
"after": true,
|
||||
"before": true
|
||||
}
|
||||
],
|
||||
"block-scoped-var": "error",
|
||||
"block-spacing": "off",
|
||||
"brace-style": [
|
||||
"error",
|
||||
"1tbs",
|
||||
{
|
||||
"allowSingleLine": true
|
||||
}
|
||||
],
|
||||
"callback-return": "error",
|
||||
"camelcase": "error",
|
||||
"capitalized-comments": "off",
|
||||
"class-methods-use-this": "error",
|
||||
"comma-dangle": "off",
|
||||
"comma-spacing": [
|
||||
"error",
|
||||
{
|
||||
"after": true,
|
||||
"before": false
|
||||
}
|
||||
],
|
||||
"comma-style": [
|
||||
"error",
|
||||
"last"
|
||||
],
|
||||
"complexity": "off",
|
||||
"computed-property-spacing": [
|
||||
"error",
|
||||
"never"
|
||||
],
|
||||
"consistent-return": "error",
|
||||
"consistent-this": "error",
|
||||
"curly": [ "error", "multi-line" ],
|
||||
"default-case": "error",
|
||||
"dot-location": "error",
|
||||
"dot-notation": [
|
||||
"error",
|
||||
{
|
||||
"allowKeywords": true
|
||||
}
|
||||
],
|
||||
"eol-last": "error",
|
||||
"eqeqeq": "off",
|
||||
"for-direction": "error",
|
||||
"func-call-spacing": "error",
|
||||
"func-name-matching": "error",
|
||||
"func-names": [
|
||||
"error",
|
||||
"never"
|
||||
],
|
||||
"func-style": [
|
||||
"error",
|
||||
"declaration",
|
||||
{ "allowArrowFunctions": true }
|
||||
],
|
||||
"function-paren-newline": "off",
|
||||
"generator-star-spacing": "error",
|
||||
"getter-return": "error",
|
||||
"global-require": "error",
|
||||
"guard-for-in": "error",
|
||||
"handle-callback-err": "error",
|
||||
"id-blacklist": "error",
|
||||
"id-length": "off",
|
||||
"id-match": "error",
|
||||
"implicit-arrow-linebreak": [
|
||||
"error",
|
||||
"beside"
|
||||
],
|
||||
"indent": ["error", 2],
|
||||
"indent-legacy": "off",
|
||||
"init-declarations": "off",
|
||||
"jsx-quotes": "error",
|
||||
"key-spacing": "error",
|
||||
"keyword-spacing": [
|
||||
"error",
|
||||
{
|
||||
"after": true,
|
||||
"before": true
|
||||
}
|
||||
],
|
||||
"line-comment-position": "off",
|
||||
"linebreak-style": [
|
||||
"error",
|
||||
"unix"
|
||||
],
|
||||
"lines-around-comment": "error",
|
||||
"lines-around-directive": "error",
|
||||
"lines-between-class-members": "error",
|
||||
"max-depth": "error",
|
||||
"max-len": "off",
|
||||
"max-lines": "off",
|
||||
"max-nested-callbacks": "error",
|
||||
"max-params": "off",
|
||||
"max-statements": "off",
|
||||
"max-statements-per-line": "off",
|
||||
"multiline-comment-style": [
|
||||
"error",
|
||||
"separate-lines"
|
||||
],
|
||||
"new-cap": ["error", {"capIsNewExceptions": ["BigInt"]}],
|
||||
"new-parens": "error",
|
||||
"newline-after-var": "off",
|
||||
"newline-before-return": "off",
|
||||
"newline-per-chained-call": "off",
|
||||
"no-alert": "error",
|
||||
"no-array-constructor": "error",
|
||||
"no-await-in-loop": "error",
|
||||
"no-bitwise": "error",
|
||||
"no-buffer-constructor": "error",
|
||||
"no-caller": "error",
|
||||
"no-catch-shadow": "error",
|
||||
"no-confusing-arrow": "off",
|
||||
"no-continue": "off",
|
||||
"no-div-regex": "error",
|
||||
"no-duplicate-imports": "error",
|
||||
"no-else-return": "error",
|
||||
"no-empty-function": "error",
|
||||
"no-eq-null": "error",
|
||||
"no-eval": "error",
|
||||
"no-extend-native": "error",
|
||||
"no-extra-bind": "error",
|
||||
"no-extra-label": "error",
|
||||
"no-extra-parens": "off",
|
||||
"no-floating-decimal": "error",
|
||||
"no-implicit-coercion": "error",
|
||||
"no-implicit-globals": "error",
|
||||
"no-implied-eval": "error",
|
||||
"no-inline-comments": "off",
|
||||
"no-invalid-this": "off",
|
||||
"no-iterator": "error",
|
||||
"no-label-var": "error",
|
||||
"no-labels": "error",
|
||||
"no-lone-blocks": "error",
|
||||
"no-lonely-if": "off",
|
||||
"no-loop-func": "error",
|
||||
"no-magic-numbers": "off",
|
||||
"no-mixed-operators": "off",
|
||||
"no-mixed-requires": "error",
|
||||
"no-multi-assign": "error",
|
||||
"no-multi-spaces": "error",
|
||||
"no-multi-str": "error",
|
||||
"no-multiple-empty-lines": ["error", { "max": 1, "maxEOF": 0, "maxBOF": 0 }],
|
||||
"no-native-reassign": "error",
|
||||
"no-negated-condition": "off",
|
||||
"no-negated-in-lhs": "error",
|
||||
"no-nested-ternary": "error",
|
||||
"no-new": "error",
|
||||
"no-new-func": "error",
|
||||
"no-new-object": "error",
|
||||
"no-new-require": "error",
|
||||
"no-new-wrappers": "error",
|
||||
"no-octal-escape": "error",
|
||||
"no-param-reassign": "off",
|
||||
"no-path-concat": "error",
|
||||
"no-plusplus": "off",
|
||||
"no-process-env": "error",
|
||||
"no-process-exit": "error",
|
||||
"no-proto": "error",
|
||||
"no-prototype-builtins": "error",
|
||||
"no-restricted-globals": "error",
|
||||
"no-restricted-imports": "error",
|
||||
"no-restricted-modules": "error",
|
||||
"no-restricted-properties": "error",
|
||||
"no-restricted-syntax": "error",
|
||||
"no-return-assign": "error",
|
||||
"no-return-await": "error",
|
||||
"no-script-url": "error",
|
||||
"no-self-compare": "error",
|
||||
"no-sequences": "error",
|
||||
"no-shadow": "error",
|
||||
"no-shadow-restricted-names": "error",
|
||||
"no-spaced-func": "error",
|
||||
"no-sync": [
|
||||
"error",
|
||||
{
|
||||
"allowAtRootLevel": true
|
||||
}
|
||||
],
|
||||
"no-tabs": "error",
|
||||
"no-template-curly-in-string": "error",
|
||||
"no-ternary": "off",
|
||||
"no-throw-literal": "error",
|
||||
"no-trailing-spaces": "error",
|
||||
"no-undef-init": "error",
|
||||
"no-undefined": "error",
|
||||
"no-underscore-dangle": "off",
|
||||
"no-unmodified-loop-condition": "error",
|
||||
"no-unneeded-ternary": "error",
|
||||
"no-unused-expressions": "error",
|
||||
"no-unused-vars": ["error", {"argsIgnorePattern": "^_"}],
|
||||
"no-use-before-define": "error",
|
||||
"no-useless-call": "error",
|
||||
"no-useless-computed-key": "error",
|
||||
"no-useless-concat": "error",
|
||||
"no-useless-constructor": "error",
|
||||
"no-useless-rename": "error",
|
||||
"no-useless-return": "error",
|
||||
"no-var": "error",
|
||||
"no-void": "error",
|
||||
"no-warning-comments": "error",
|
||||
"no-whitespace-before-property": "error",
|
||||
"no-with": "error",
|
||||
"nonblock-statement-body-position": [
|
||||
"error",
|
||||
"any"
|
||||
],
|
||||
"object-curly-newline": "off",
|
||||
"object-curly-spacing": "off",
|
||||
"object-property-newline": "off",
|
||||
"object-shorthand": "off",
|
||||
"one-var": "off",
|
||||
"one-var-declaration-per-line": "off",
|
||||
"operator-assignment": "error",
|
||||
"operator-linebreak": "error",
|
||||
"padded-blocks": "off",
|
||||
"padding-line-between-statements": "error",
|
||||
"prefer-arrow-callback": "off",
|
||||
"prefer-const": "off",
|
||||
"prefer-destructuring": "off",
|
||||
"prefer-numeric-literals": "error",
|
||||
"prefer-promise-reject-errors": "error",
|
||||
"prefer-reflect": "off",
|
||||
"prefer-rest-params": "error",
|
||||
"prefer-spread": "error",
|
||||
"prefer-template": "error",
|
||||
"quote-props": ["error", "as-needed"],
|
||||
"quotes": ["error", "double"],
|
||||
"radix": "error",
|
||||
"require-await": "error",
|
||||
"require-jsdoc": "off",
|
||||
"rest-spread-spacing": "error",
|
||||
"semi": ["error", "never"],
|
||||
"semi-spacing": "error",
|
||||
"semi-style": [
|
||||
"error",
|
||||
"last"
|
||||
],
|
||||
"sort-imports": "error",
|
||||
"sort-keys": "off",
|
||||
"sort-vars": "off",
|
||||
"space-before-blocks": "error",
|
||||
"space-before-function-paren": "off",
|
||||
"space-in-parens": [
|
||||
"error",
|
||||
"never"
|
||||
],
|
||||
"space-infix-ops": "error",
|
||||
"space-unary-ops": "error",
|
||||
"spaced-comment": "off",
|
||||
"strict": "error",
|
||||
"switch-colon-spacing": "error",
|
||||
"symbol-description": "error",
|
||||
"template-curly-spacing": "error",
|
||||
"template-tag-spacing": "error",
|
||||
"unicode-bom": [
|
||||
"error",
|
||||
"never"
|
||||
],
|
||||
"valid-jsdoc": "error",
|
||||
"vars-on-top": "off",
|
||||
"wrap-regex": "error",
|
||||
"yield-star-spacing": "error",
|
||||
"yoda": [
|
||||
"error",
|
||||
"never"
|
||||
],
|
||||
"node/no-unpublished-require": "off"
|
||||
}
|
||||
}
|
21
node_modules/acorn-bigint/CHANGELOG.md
generated
vendored
Normal file
21
node_modules/acorn-bigint/CHANGELOG.md
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
## 0.4.0 (2019-04-04)
|
||||
|
||||
* Make compatible with acorn-numeric-separator
|
||||
|
||||
## 0.3.1 (2018-10-06)
|
||||
|
||||
* Fix creation of BigInt values everywhere (Thanks, Gus Caplan!)
|
||||
|
||||
## 0.3.0 (2018-09-14)
|
||||
|
||||
* Update to new acorn 6 interface
|
||||
* Actually support creating BigInt values in AST in Chrome
|
||||
* Change license to MIT
|
||||
|
||||
## 0.2.0 (2017-12-20)
|
||||
|
||||
* Emit BigInt values in AST if supported by runtime engine
|
||||
|
||||
## 0.1.0 (2017-12-19)
|
||||
|
||||
Initial release
|
19
node_modules/acorn-bigint/LICENSE
generated
vendored
Normal file
19
node_modules/acorn-bigint/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
Copyright (C) 2017-2018 by Adrian Heine
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
21
node_modules/acorn-bigint/README.md
generated
vendored
Normal file
21
node_modules/acorn-bigint/README.md
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
# BigInt support for Acorn
|
||||
|
||||
[](https://www.npmjs.org/package/acorn-bigint)
|
||||
|
||||
This is a plugin for [Acorn](http://marijnhaverbeke.nl/acorn/) - a tiny, fast JavaScript parser, written completely in JavaScript.
|
||||
|
||||
It implements support for arbitrary precision integers as defined in the stage 3 proposal [BigInt: Arbitrary precision integers in JavaScript](https://github.com/tc39/proposal-bigint). The emitted AST follows [an ESTree proposal](https://github.com/estree/estree/blob/132be9b9ec376adbc082dd5f6ba78aefd7a1a864/experimental/bigint.md).
|
||||
|
||||
## Usage
|
||||
|
||||
This module provides a plugin that can be used to extend the Acorn `Parser` class:
|
||||
|
||||
```javascript
|
||||
const {Parser} = require('acorn');
|
||||
const bigInt = require('acorn-bigint');
|
||||
Parser.extend(bigInt).parse('100n');
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
This plugin is released under an [MIT License](./LICENSE).
|
59
node_modules/acorn-bigint/index.js
generated
vendored
Normal file
59
node_modules/acorn-bigint/index.js
generated
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
"use strict"
|
||||
|
||||
const acorn = require("acorn")
|
||||
const tt = acorn.tokTypes
|
||||
const isIdentifierStart = acorn.isIdentifierStart
|
||||
|
||||
module.exports = function(Parser) {
|
||||
return class extends Parser {
|
||||
parseLiteral(value) {
|
||||
const node = super.parseLiteral(value)
|
||||
if (node.raw.charCodeAt(node.raw.length - 1) == 110) node.bigint = this.getNumberInput(node.start, node.end)
|
||||
return node
|
||||
}
|
||||
|
||||
readRadixNumber(radix) {
|
||||
let start = this.pos
|
||||
this.pos += 2 // 0x
|
||||
let val = this.readInt(radix)
|
||||
if (val === null) this.raise(this.start + 2, `Expected number in radix ${radix}`)
|
||||
if (this.input.charCodeAt(this.pos) == 110) {
|
||||
let str = this.getNumberInput(start, this.pos)
|
||||
val = typeof BigInt !== "undefined" ? BigInt(str) : null
|
||||
++this.pos
|
||||
} else if (isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.pos, "Identifier directly after number")
|
||||
return this.finishToken(tt.num, val)
|
||||
}
|
||||
|
||||
readNumber(startsWithDot) {
|
||||
let start = this.pos
|
||||
|
||||
// Not an int
|
||||
if (startsWithDot) return super.readNumber(startsWithDot)
|
||||
|
||||
// Legacy octal
|
||||
if (this.input.charCodeAt(start) === 48 && this.input.charCodeAt(start + 1) !== 110) {
|
||||
return super.readNumber(startsWithDot)
|
||||
}
|
||||
|
||||
if (this.readInt(10) === null) this.raise(start, "Invalid number")
|
||||
|
||||
// Not a BigInt, reset and parse again
|
||||
if (this.input.charCodeAt(this.pos) != 110) {
|
||||
this.pos = start
|
||||
return super.readNumber(startsWithDot)
|
||||
}
|
||||
|
||||
let str = this.getNumberInput(start, this.pos)
|
||||
let val = typeof BigInt !== "undefined" ? BigInt(str) : null
|
||||
++this.pos
|
||||
return this.finishToken(tt.num, val)
|
||||
}
|
||||
|
||||
// This is basically a hook for acorn-numeric-separator
|
||||
getNumberInput(start, end) {
|
||||
if (super.getNumberInput) return super.getNumberInput(start, end)
|
||||
return this.input.slice(start, end)
|
||||
}
|
||||
}
|
||||
}
|
68
node_modules/acorn-bigint/package.json
generated
vendored
Normal file
68
node_modules/acorn-bigint/package.json
generated
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"acorn-bigint@0.4.0",
|
||||
"D:\\Projects\\siag\\vanillajs-seed"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
"_from": "acorn-bigint@0.4.0",
|
||||
"_id": "acorn-bigint@0.4.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-W9iaqWzqFo7ZBLmI9dMjHYGrN0Nm/ZgToqhvd3RELJux7RsX6k1/80h+bD9TtTpeKky/kYNbr3+vHWqI3hdyfA==",
|
||||
"_location": "/acorn-bigint",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "acorn-bigint@0.4.0",
|
||||
"name": "acorn-bigint",
|
||||
"escapedName": "acorn-bigint",
|
||||
"rawSpec": "0.4.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "0.4.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/acorn-stage3"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/acorn-bigint/-/acorn-bigint-0.4.0.tgz",
|
||||
"_spec": "0.4.0",
|
||||
"_where": "D:\\Projects\\siag\\vanillajs-seed",
|
||||
"bugs": {
|
||||
"url": "https://github.com/acornjs/acorn-bigint/issues"
|
||||
},
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Adrian Heine",
|
||||
"email": "mail@adrianheine.de"
|
||||
}
|
||||
],
|
||||
"description": "Support for BigInt in acorn",
|
||||
"devDependencies": {
|
||||
"acorn": "^6.1.1",
|
||||
"eslint": "^5.16.0",
|
||||
"eslint-plugin-node": "^8.0.1",
|
||||
"mocha": "^6.0.2",
|
||||
"test262": "git+https://github.com/tc39/test262.git#611919174ffe060503691a0c7e3eb2a65b646124",
|
||||
"test262-parser-runner": "^0.5.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4.8.2"
|
||||
},
|
||||
"homepage": "https://github.com/acornjs/acorn-bigint",
|
||||
"license": "MIT",
|
||||
"name": "acorn-bigint",
|
||||
"peerDependencies": {
|
||||
"acorn": "^6.0.0"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/acornjs/acorn-bigint.git"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint -c .eslintrc.json .",
|
||||
"test": "mocha",
|
||||
"test:test262": "node run_test262.js"
|
||||
},
|
||||
"version": "0.4.0"
|
||||
}
|
21
node_modules/acorn-bigint/run_test262.js
generated
vendored
Normal file
21
node_modules/acorn-bigint/run_test262.js
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
"use strict"
|
||||
|
||||
const path = require("path")
|
||||
const run = require("test262-parser-runner")
|
||||
const acorn = require("acorn")
|
||||
const bigInt = require(".")
|
||||
const Parser = acorn.Parser.extend(bigInt)
|
||||
|
||||
const unsupportedFeatures = [
|
||||
"async-iteration",
|
||||
"class-fields-private",
|
||||
"class-fields-public"
|
||||
]
|
||||
|
||||
run(
|
||||
(content, options) => Parser.parse(content, {sourceType: options.sourceType, ecmaVersion: 9}),
|
||||
{
|
||||
testsDirectory: path.dirname(require.resolve("test262/package.json")),
|
||||
skip: test => (!test.attrs.features || !test.attrs.features.includes("BigInt") || unsupportedFeatures.some(f => test.attrs.features.includes(f))),
|
||||
}
|
||||
)
|
5
node_modules/acorn-bigint/test/.eslintrc.json
generated
vendored
Normal file
5
node_modules/acorn-bigint/test/.eslintrc.json
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"env": {
|
||||
"mocha": true
|
||||
}
|
||||
}
|
193
node_modules/acorn-bigint/test/test.js
generated
vendored
Normal file
193
node_modules/acorn-bigint/test/test.js
generated
vendored
Normal file
@@ -0,0 +1,193 @@
|
||||
"use strict"
|
||||
|
||||
const assert = require("assert")
|
||||
const acorn = require("acorn")
|
||||
const Parser = acorn.Parser.extend(require(".."))
|
||||
|
||||
function test(text, expectedResult, additionalOptions) {
|
||||
it(text, function () {
|
||||
const result = Parser.parse(text, Object.assign({ ecmaVersion: 9 }, additionalOptions))
|
||||
assert.deepStrictEqual(result.body[0], expectedResult)
|
||||
})
|
||||
}
|
||||
function testFail(text, expectedError, additionalOptions) {
|
||||
it(text, function () {
|
||||
let failed = false
|
||||
try {
|
||||
Parser.parse(text, Object.assign({ ecmaVersion: 9 }, additionalOptions))
|
||||
} catch (e) {
|
||||
assert.strictEqual(e.message, expectedError)
|
||||
failed = true
|
||||
}
|
||||
assert(failed)
|
||||
})
|
||||
}
|
||||
|
||||
const newNode = (start, props) => Object.assign(new acorn.Node({options: {}}, start), props)
|
||||
const newBigIntLiteral = (start, stringValue) => newNode(start, {
|
||||
type: "Literal",
|
||||
end: start + stringValue.length + 1,
|
||||
value: typeof BigInt !== "undefined" ? BigInt(stringValue) : null,
|
||||
raw: `${stringValue}n`,
|
||||
bigint: `${stringValue}n`
|
||||
})
|
||||
|
||||
describe("acorn-bigint", function () {
|
||||
const digits = [
|
||||
{d: "0", ast: start => newBigIntLiteral(start, "0")},
|
||||
{d: "2", ast: start => newBigIntLiteral(start, "2")},
|
||||
{d: "0x2", ast: start => newBigIntLiteral(start, "0x2")},
|
||||
{d: "0o2", ast: start => newBigIntLiteral(start, "0o2")},
|
||||
{d: "0b10", ast: start => newBigIntLiteral(start, "0b10")},
|
||||
{d: "-0xbf2ed51ff75d380fd3be813ec6185780", ast: start => newNode(start, {
|
||||
type: "UnaryExpression",
|
||||
end: start + 36,
|
||||
operator: "-",
|
||||
prefix: true,
|
||||
argument: newBigIntLiteral(start + 1, "0xbf2ed51ff75d380fd3be813ec6185780")
|
||||
})},
|
||||
{d: "02", error: start => `Identifier directly after number (1:${start + 2})`},
|
||||
{d: "2e2", error: start => `Identifier directly after number (1:${start + 3})`},
|
||||
{d: "2.4", error: start => `Identifier directly after number (1:${start + 3})`},
|
||||
{d: ".4", error: start => `Identifier directly after number (1:${start + 2})`},
|
||||
]
|
||||
const statements = [
|
||||
{s: "let i = %s", ast: content => newNode(0, {
|
||||
type: "VariableDeclaration",
|
||||
end: content.end,
|
||||
kind: "let",
|
||||
declarations: [newNode(4, {
|
||||
type: "VariableDeclarator",
|
||||
end: content.end,
|
||||
id: newNode(4, {
|
||||
type: "Identifier",
|
||||
end: 5,
|
||||
name: "i"
|
||||
}),
|
||||
init: content
|
||||
})]
|
||||
})},
|
||||
|
||||
{s: "i = %s", ast: content => newNode(0, {
|
||||
type: "ExpressionStatement",
|
||||
end: content.end,
|
||||
expression: newNode(0, {
|
||||
type: "AssignmentExpression",
|
||||
end: content.end,
|
||||
operator: "=",
|
||||
left: newNode(0, {
|
||||
type: "Identifier",
|
||||
end: 1,
|
||||
name: "i"
|
||||
}),
|
||||
right: content
|
||||
})
|
||||
})},
|
||||
|
||||
{s: "((i = %s) => {})", ast: content => newNode(0, {
|
||||
type: "ExpressionStatement",
|
||||
end: content.end + 8,
|
||||
expression: newNode(1, {
|
||||
type: "ArrowFunctionExpression",
|
||||
end: content.end + 7,
|
||||
id: null,
|
||||
generator: false,
|
||||
expression: false,
|
||||
async: false,
|
||||
params: [
|
||||
newNode(2, {
|
||||
type: "AssignmentPattern",
|
||||
end: content.end,
|
||||
left: newNode(2, {
|
||||
type: "Identifier",
|
||||
end: 3,
|
||||
name: "i"
|
||||
}),
|
||||
right: content
|
||||
})
|
||||
],
|
||||
body: newNode(content.end + 5, {
|
||||
type: "BlockStatement",
|
||||
end: content.end + 7,
|
||||
body: []
|
||||
})
|
||||
})
|
||||
})},
|
||||
|
||||
{s: "for (let i = 0n; i < %s;++i) {}", ast: content => newNode(0, {
|
||||
type: "ForStatement",
|
||||
end: content.end + 8,
|
||||
init: newNode(5, {
|
||||
type: "VariableDeclaration",
|
||||
end: 15,
|
||||
declarations: [
|
||||
newNode(9, {
|
||||
type: "VariableDeclarator",
|
||||
end: 15,
|
||||
id: newNode(9, {
|
||||
type: "Identifier",
|
||||
end: 10,
|
||||
name: "i"
|
||||
}),
|
||||
init: newBigIntLiteral(13, "0")
|
||||
})
|
||||
],
|
||||
kind: "let"
|
||||
}),
|
||||
test: newNode(17, {
|
||||
type: "BinaryExpression",
|
||||
end: content.end,
|
||||
left: newNode(17, {
|
||||
type: "Identifier",
|
||||
start: 17,
|
||||
end: 18,
|
||||
name: "i"
|
||||
}),
|
||||
operator: "<",
|
||||
right: content
|
||||
}),
|
||||
update: newNode(content.end + 1, {
|
||||
type: "UpdateExpression",
|
||||
end: content.end + 4,
|
||||
operator: "++",
|
||||
prefix: true,
|
||||
argument: newNode(content.end + 3, {
|
||||
type: "Identifier",
|
||||
end: content.end + 4,
|
||||
name: "i"
|
||||
})
|
||||
}),
|
||||
body: newNode(content.end + 6, {
|
||||
type: "BlockStatement",
|
||||
end: content.end + 8,
|
||||
body: []
|
||||
})
|
||||
})},
|
||||
|
||||
{s: "i + %s", ast: content => newNode(0, {
|
||||
type: "ExpressionStatement",
|
||||
end: content.end,
|
||||
expression: newNode(0, {
|
||||
type: "BinaryExpression",
|
||||
end: content.end,
|
||||
left: newNode(0, {
|
||||
type: "Identifier",
|
||||
start: 0,
|
||||
end: 1,
|
||||
name: "i"
|
||||
}),
|
||||
operator: "+",
|
||||
right: content
|
||||
})
|
||||
})}
|
||||
]
|
||||
statements.forEach(statement => {
|
||||
const start = statement.s.indexOf("%s")
|
||||
digits.forEach(d => {
|
||||
(d.error ? testFail : test)(
|
||||
statement.s.replace("%s", `${d.d}n`),
|
||||
d.error ? d.error(start) : statement.ast(d.ast(start))
|
||||
)
|
||||
})
|
||||
})
|
||||
})
|
294
node_modules/acorn-class-fields/.eslintrc.json
generated
vendored
Normal file
294
node_modules/acorn-class-fields/.eslintrc.json
generated
vendored
Normal file
@@ -0,0 +1,294 @@
|
||||
{
|
||||
"env": {
|
||||
"es6": true,
|
||||
"node": true
|
||||
},
|
||||
"extends": ["eslint:recommended", "plugin:node/recommended"],
|
||||
"plugins": ["node"],
|
||||
"rules": {
|
||||
"accessor-pairs": "error",
|
||||
"array-bracket-newline": "off",
|
||||
"array-bracket-spacing": "off",
|
||||
"array-callback-return": "error",
|
||||
"array-element-newline": "off",
|
||||
"arrow-body-style": "error",
|
||||
"arrow-parens": [
|
||||
"error",
|
||||
"as-needed"
|
||||
],
|
||||
"arrow-spacing": [
|
||||
"error",
|
||||
{
|
||||
"after": true,
|
||||
"before": true
|
||||
}
|
||||
],
|
||||
"block-scoped-var": "error",
|
||||
"block-spacing": "off",
|
||||
"brace-style": [
|
||||
"error",
|
||||
"1tbs",
|
||||
{
|
||||
"allowSingleLine": true
|
||||
}
|
||||
],
|
||||
"callback-return": "error",
|
||||
"camelcase": "error",
|
||||
"capitalized-comments": "off",
|
||||
"class-methods-use-this": "error",
|
||||
"comma-dangle": "off",
|
||||
"comma-spacing": [
|
||||
"error",
|
||||
{
|
||||
"after": true,
|
||||
"before": false
|
||||
}
|
||||
],
|
||||
"comma-style": [
|
||||
"error",
|
||||
"last"
|
||||
],
|
||||
"complexity": "off",
|
||||
"computed-property-spacing": [
|
||||
"error",
|
||||
"never"
|
||||
],
|
||||
"consistent-return": "error",
|
||||
"consistent-this": "error",
|
||||
"curly": [ "error", "multi-line" ],
|
||||
"default-case": "error",
|
||||
"dot-location": "error",
|
||||
"dot-notation": [
|
||||
"error",
|
||||
{
|
||||
"allowKeywords": true
|
||||
}
|
||||
],
|
||||
"eol-last": "error",
|
||||
"eqeqeq": "off",
|
||||
"for-direction": "error",
|
||||
"func-call-spacing": "error",
|
||||
"func-name-matching": "error",
|
||||
"func-names": [
|
||||
"error",
|
||||
"never"
|
||||
],
|
||||
"func-style": [
|
||||
"error",
|
||||
"declaration",
|
||||
{ "allowArrowFunctions": true }
|
||||
],
|
||||
"function-paren-newline": "off",
|
||||
"generator-star-spacing": "error",
|
||||
"getter-return": "error",
|
||||
"global-require": "warn",
|
||||
"guard-for-in": "error",
|
||||
"handle-callback-err": "error",
|
||||
"id-blacklist": "error",
|
||||
"id-length": "off",
|
||||
"id-match": "error",
|
||||
"implicit-arrow-linebreak": [
|
||||
"error",
|
||||
"beside"
|
||||
],
|
||||
"indent": ["error", 2],
|
||||
"indent-legacy": "off",
|
||||
"init-declarations": "off",
|
||||
"jsx-quotes": "error",
|
||||
"key-spacing": "error",
|
||||
"keyword-spacing": [
|
||||
"error",
|
||||
{
|
||||
"after": true,
|
||||
"before": true
|
||||
}
|
||||
],
|
||||
"line-comment-position": "off",
|
||||
"linebreak-style": [
|
||||
"error",
|
||||
"unix"
|
||||
],
|
||||
"lines-around-comment": "error",
|
||||
"lines-around-directive": "error",
|
||||
"lines-between-class-members": "error",
|
||||
"max-depth": "error",
|
||||
"max-len": "off",
|
||||
"max-lines": "off",
|
||||
"max-nested-callbacks": "error",
|
||||
"max-params": "off",
|
||||
"max-statements": "off",
|
||||
"max-statements-per-line": "off",
|
||||
"multiline-comment-style": [
|
||||
"error",
|
||||
"separate-lines"
|
||||
],
|
||||
"new-cap": "error",
|
||||
"new-parens": "error",
|
||||
"newline-after-var": "off",
|
||||
"newline-before-return": "off",
|
||||
"newline-per-chained-call": "off",
|
||||
"no-alert": "error",
|
||||
"no-array-constructor": "error",
|
||||
"no-await-in-loop": "error",
|
||||
"no-bitwise": "off",
|
||||
"no-buffer-constructor": "error",
|
||||
"no-caller": "error",
|
||||
"no-catch-shadow": "error",
|
||||
"no-confusing-arrow": "error",
|
||||
"no-continue": "off",
|
||||
"no-div-regex": "error",
|
||||
"no-duplicate-imports": "error",
|
||||
"no-else-return": "error",
|
||||
"no-empty-function": "error",
|
||||
"no-eq-null": "error",
|
||||
"no-eval": "error",
|
||||
"no-extend-native": "error",
|
||||
"no-extra-bind": "error",
|
||||
"no-extra-label": "error",
|
||||
"no-extra-parens": "off",
|
||||
"no-floating-decimal": "error",
|
||||
"no-implicit-coercion": "error",
|
||||
"no-implicit-globals": "error",
|
||||
"no-implied-eval": "error",
|
||||
"no-inline-comments": "off",
|
||||
"no-invalid-this": "off",
|
||||
"no-iterator": "error",
|
||||
"no-label-var": "error",
|
||||
"no-labels": "error",
|
||||
"no-lone-blocks": "error",
|
||||
"no-lonely-if": "off",
|
||||
"no-loop-func": "error",
|
||||
"no-magic-numbers": "off",
|
||||
"no-mixed-operators": "off",
|
||||
"no-mixed-requires": "error",
|
||||
"no-multi-assign": "error",
|
||||
"no-multi-spaces": "error",
|
||||
"no-multi-str": "error",
|
||||
"no-multiple-empty-lines": ["error", { "max": 1, "maxEOF": 0, "maxBOF": 0 }],
|
||||
"no-native-reassign": "error",
|
||||
"no-negated-condition": "off",
|
||||
"no-negated-in-lhs": "error",
|
||||
"no-nested-ternary": "error",
|
||||
"no-new": "error",
|
||||
"no-new-func": "error",
|
||||
"no-new-object": "error",
|
||||
"no-new-require": "error",
|
||||
"no-new-wrappers": "error",
|
||||
"no-octal-escape": "error",
|
||||
"no-param-reassign": "off",
|
||||
"no-path-concat": "error",
|
||||
"no-plusplus": "off",
|
||||
"no-process-env": "error",
|
||||
"no-process-exit": "error",
|
||||
"no-proto": "error",
|
||||
"no-prototype-builtins": "error",
|
||||
"no-restricted-globals": "error",
|
||||
"no-restricted-imports": "error",
|
||||
"no-restricted-modules": "error",
|
||||
"no-restricted-properties": "error",
|
||||
"no-restricted-syntax": "error",
|
||||
"no-return-assign": "error",
|
||||
"no-return-await": "error",
|
||||
"no-script-url": "error",
|
||||
"no-self-compare": "error",
|
||||
"no-sequences": "error",
|
||||
"no-shadow": "error",
|
||||
"no-shadow-restricted-names": "error",
|
||||
"no-spaced-func": "error",
|
||||
"no-sync": [
|
||||
"error",
|
||||
{
|
||||
"allowAtRootLevel": true
|
||||
}
|
||||
],
|
||||
"no-tabs": "error",
|
||||
"no-template-curly-in-string": "error",
|
||||
"no-ternary": "off",
|
||||
"no-throw-literal": "error",
|
||||
"no-trailing-spaces": "error",
|
||||
"no-undef-init": "error",
|
||||
"no-undefined": "error",
|
||||
"no-underscore-dangle": "off",
|
||||
"no-unmodified-loop-condition": "error",
|
||||
"no-unneeded-ternary": "error",
|
||||
"no-unused-expressions": "error",
|
||||
"no-unused-vars": ["error", {"argsIgnorePattern": "^_"}],
|
||||
"no-use-before-define": "error",
|
||||
"no-useless-call": "error",
|
||||
"no-useless-computed-key": "error",
|
||||
"no-useless-concat": "error",
|
||||
"no-useless-constructor": "error",
|
||||
"no-useless-rename": "error",
|
||||
"no-useless-return": "error",
|
||||
"no-var": "error",
|
||||
"no-void": "error",
|
||||
"no-warning-comments": "warn",
|
||||
"no-whitespace-before-property": "error",
|
||||
"no-with": "error",
|
||||
"nonblock-statement-body-position": [
|
||||
"error",
|
||||
"any"
|
||||
],
|
||||
"object-curly-newline": "off",
|
||||
"object-curly-spacing": "off",
|
||||
"object-property-newline": "off",
|
||||
"object-shorthand": "off",
|
||||
"one-var": "off",
|
||||
"one-var-declaration-per-line": "off",
|
||||
"operator-assignment": "error",
|
||||
"operator-linebreak": "error",
|
||||
"padded-blocks": "off",
|
||||
"padding-line-between-statements": "error",
|
||||
"prefer-arrow-callback": "off",
|
||||
"prefer-const": "off",
|
||||
"prefer-destructuring": "off",
|
||||
"prefer-numeric-literals": "error",
|
||||
"prefer-promise-reject-errors": "error",
|
||||
"prefer-reflect": "off",
|
||||
"prefer-rest-params": "off",
|
||||
"prefer-spread": "error",
|
||||
"prefer-template": "error",
|
||||
"quote-props": ["error", "as-needed"],
|
||||
"quotes": ["error", "double"],
|
||||
"radix": "error",
|
||||
"require-await": "error",
|
||||
"require-jsdoc": "off",
|
||||
"rest-spread-spacing": "error",
|
||||
"semi": ["error", "never"],
|
||||
"semi-spacing": "error",
|
||||
"semi-style": [
|
||||
"error",
|
||||
"last"
|
||||
],
|
||||
"sort-imports": "error",
|
||||
"sort-keys": "off",
|
||||
"sort-vars": "off",
|
||||
"space-before-blocks": "error",
|
||||
"space-before-function-paren": "off",
|
||||
"space-in-parens": [
|
||||
"error",
|
||||
"never"
|
||||
],
|
||||
"space-infix-ops": "error",
|
||||
"space-unary-ops": "error",
|
||||
"spaced-comment": "off",
|
||||
"strict": "error",
|
||||
"switch-colon-spacing": "error",
|
||||
"symbol-description": "error",
|
||||
"template-curly-spacing": "error",
|
||||
"template-tag-spacing": "error",
|
||||
"unicode-bom": [
|
||||
"error",
|
||||
"never"
|
||||
],
|
||||
"valid-jsdoc": "error",
|
||||
"vars-on-top": "off",
|
||||
"wrap-regex": "error",
|
||||
"yield-star-spacing": "error",
|
||||
"yoda": [
|
||||
"error",
|
||||
"never"
|
||||
],
|
||||
"node/no-unpublished-require": "off"
|
||||
}
|
||||
}
|
45
node_modules/acorn-class-fields/CHANGELOG.md
generated
vendored
Normal file
45
node_modules/acorn-class-fields/CHANGELOG.md
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
## 0.3.4 (2020-05-21)
|
||||
|
||||
* Allow keyword field names
|
||||
|
||||
## 0.3.3 (2020-05-20)
|
||||
|
||||
* Support numeric field names
|
||||
|
||||
## 0.3.2 (2020-04-24)
|
||||
|
||||
* Make compatible with acorn@7
|
||||
* Use injected acorn instance if available
|
||||
* Evaluate class heritage with outer private environment
|
||||
* Don't allow private element access on `super`
|
||||
* Uses `Object.getPrototypeOf` if available instead of `__proto__`
|
||||
* Fix usage of super in field initializers
|
||||
|
||||
## 0.3.1 (2019-02-09)
|
||||
|
||||
* Restore compatibility with acorn-private-methods
|
||||
|
||||
## 0.3.0 (2019-02-09)
|
||||
|
||||
* Require acorn >= 6.1.0
|
||||
|
||||
## 0.2.1 (2018-11-06)
|
||||
|
||||
* Adapt to changes in acorn 6.0.3
|
||||
|
||||
## 0.2.0 (2018-09-14)
|
||||
|
||||
* Update to new acorn 6 interface
|
||||
* Change license to MIT
|
||||
|
||||
## 0.1.2 (2018-01-26)
|
||||
|
||||
* Don't accept whitespace between hash and private name
|
||||
|
||||
## 0.1.1 (2018-01-17)
|
||||
|
||||
* Correctly parse all fields named `async`
|
||||
|
||||
## 0.1.0 (2018-01-13)
|
||||
|
||||
Initial release
|
19
node_modules/acorn-class-fields/LICENSE
generated
vendored
Normal file
19
node_modules/acorn-class-fields/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
Copyright (C) 2017-2018 by Adrian Heine
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
21
node_modules/acorn-class-fields/README.md
generated
vendored
Normal file
21
node_modules/acorn-class-fields/README.md
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
# Class fields support for Acorn
|
||||
|
||||
[](https://www.npmjs.org/package/acorn-class-fields)
|
||||
|
||||
This is a plugin for [Acorn](http://marijnhaverbeke.nl/acorn/) - a tiny, fast JavaScript parser, written completely in JavaScript.
|
||||
|
||||
It implements support for class fields as defined in the stage 3 proposal [Class field declarations for JavaScript](https://github.com/tc39/proposal-class-fields). The emitted AST follows [an ESTree proposal](https://github.com/estree/estree/pull/180).
|
||||
|
||||
## Usage
|
||||
|
||||
This module provides a plugin that can be used to extend the Acorn `Parser` class:
|
||||
|
||||
```javascript
|
||||
const {Parser} = require('acorn');
|
||||
const classFields = require('acorn-class-fields');
|
||||
Parser.extend(classFields).parse('class X { x = 0 }');
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
This plugin is released under an [MIT License](./LICENSE).
|
62
node_modules/acorn-class-fields/index.js
generated
vendored
Normal file
62
node_modules/acorn-class-fields/index.js
generated
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
"use strict"
|
||||
|
||||
const privateClassElements = require("acorn-private-class-elements")
|
||||
|
||||
module.exports = function(Parser) {
|
||||
const acorn = Parser.acorn || require("acorn")
|
||||
const tt = acorn.tokTypes
|
||||
|
||||
Parser = privateClassElements(Parser)
|
||||
return class extends Parser {
|
||||
_maybeParseFieldValue(field) {
|
||||
if (this.eat(tt.eq)) {
|
||||
const oldInFieldValue = this._inFieldValue
|
||||
this._inFieldValue = true
|
||||
field.value = this.parseExpression()
|
||||
this._inFieldValue = oldInFieldValue
|
||||
} else field.value = null
|
||||
}
|
||||
|
||||
// Parse fields
|
||||
parseClassElement(_constructorAllowsSuper) {
|
||||
if (this.options.ecmaVersion >= 8 && (this.type == tt.name || this.type.keyword || this.type == this.privateNameToken || this.type == tt.bracketL || this.type == tt.string || this.type == tt.num)) {
|
||||
const branch = this._branch()
|
||||
if (branch.type == tt.bracketL) {
|
||||
let count = 0
|
||||
do {
|
||||
if (branch.eat(tt.bracketL)) ++count
|
||||
else if (branch.eat(tt.bracketR)) --count
|
||||
else branch.next()
|
||||
} while (count > 0)
|
||||
} else branch.next()
|
||||
if (branch.type == tt.eq || branch.canInsertSemicolon() || branch.type == tt.semi) {
|
||||
const node = this.startNode()
|
||||
if (this.type == this.privateNameToken) {
|
||||
this.parsePrivateClassElementName(node)
|
||||
} else {
|
||||
this.parsePropertyName(node)
|
||||
}
|
||||
if ((node.key.type === "Identifier" && node.key.name === "constructor") ||
|
||||
(node.key.type === "Literal" && node.key.value === "constructor")) {
|
||||
this.raise(node.key.start, "Classes may not have a field called constructor")
|
||||
}
|
||||
this.enterScope(64 | 2 | 1) // See acorn's scopeflags.js
|
||||
this._maybeParseFieldValue(node)
|
||||
this.exitScope()
|
||||
this.finishNode(node, "FieldDefinition")
|
||||
this.semicolon()
|
||||
return node
|
||||
}
|
||||
}
|
||||
|
||||
return super.parseClassElement.apply(this, arguments)
|
||||
}
|
||||
|
||||
// Prohibit arguments in class field initializers
|
||||
parseIdent(liberal, isBinding) {
|
||||
const ident = super.parseIdent(liberal, isBinding)
|
||||
if (this._inFieldValue && ident.name == "arguments") this.raise(ident.start, "A class field initializer may not contain arguments")
|
||||
return ident
|
||||
}
|
||||
}
|
||||
}
|
71
node_modules/acorn-class-fields/package.json
generated
vendored
Normal file
71
node_modules/acorn-class-fields/package.json
generated
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"acorn-class-fields@0.3.4",
|
||||
"D:\\Projects\\siag\\vanillajs-seed"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
"_from": "acorn-class-fields@0.3.4",
|
||||
"_id": "acorn-class-fields@0.3.4",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-yqUCIu0UJHFmCVhH3Cq29UR+3OJo1CtNWf1ncxTf3KfdEDt7aD0iVYmX7UN+RvIHyOsgukzplQhNkgePtASLUw==",
|
||||
"_location": "/acorn-class-fields",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "acorn-class-fields@0.3.4",
|
||||
"name": "acorn-class-fields",
|
||||
"escapedName": "acorn-class-fields",
|
||||
"rawSpec": "0.3.4",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "0.3.4"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/acorn-stage3"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/acorn-class-fields/-/acorn-class-fields-0.3.4.tgz",
|
||||
"_spec": "0.3.4",
|
||||
"_where": "D:\\Projects\\siag\\vanillajs-seed",
|
||||
"bugs": {
|
||||
"url": "https://github.com/acornjs/acorn-class-fields/issues"
|
||||
},
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Adrian Heine",
|
||||
"email": "mail@adrianheine.de"
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"acorn-private-class-elements": "^0.2.5"
|
||||
},
|
||||
"description": "Support for class fields in acorn",
|
||||
"devDependencies": {
|
||||
"acorn": "^6.0.0 || ^7.0.0",
|
||||
"eslint": "^6",
|
||||
"eslint-plugin-node": "^11",
|
||||
"mocha": "^7",
|
||||
"test262": "git+https://github.com/tc39/test262.git#058adfed86b1d4129996faaf50a85ea55379a66a",
|
||||
"test262-parser-runner": "^0.5.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4.8.2"
|
||||
},
|
||||
"homepage": "https://github.com/acornjs/acorn-class-fields",
|
||||
"license": "MIT",
|
||||
"name": "acorn-class-fields",
|
||||
"peerDependencies": {
|
||||
"acorn": "^6.0.0 || ^7.0.0"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/acornjs/acorn-class-fields.git"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint -c .eslintrc.json .",
|
||||
"test": "mocha",
|
||||
"test:test262": "node run_test262.js"
|
||||
},
|
||||
"version": "0.3.4"
|
||||
}
|
26
node_modules/acorn-class-fields/run_test262.js
generated
vendored
Normal file
26
node_modules/acorn-class-fields/run_test262.js
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
"use strict"
|
||||
|
||||
const fs = require("fs")
|
||||
const path = require("path")
|
||||
const run = require("test262-parser-runner")
|
||||
const acorn = require("acorn")
|
||||
const Parser = acorn.Parser.extend(require("."))
|
||||
|
||||
const unsupportedFeatures = [
|
||||
"class-methods-private",
|
||||
"class-static-fields-public",
|
||||
"class-static-fields-private",
|
||||
"class-static-methods-private",
|
||||
"optional-chaining"
|
||||
]
|
||||
|
||||
const implementedFeatures = [ "class-fields-private", "class-fields-public" ]
|
||||
|
||||
run(
|
||||
(content, options) => Parser.parse(content, {sourceType: options.sourceType, ecmaVersion: 11}),
|
||||
{
|
||||
testsDirectory: path.dirname(require.resolve("test262/package.json")),
|
||||
skip: test => (!test.attrs.features || !implementedFeatures.some(f => test.attrs.features.includes(f)) || unsupportedFeatures.some(f => test.attrs.features.includes(f))),
|
||||
whitelist: fs.readFileSync("./test262.whitelist", "utf8").split("\n").filter(v => v && v[0] !== "#")
|
||||
}
|
||||
)
|
5
node_modules/acorn-class-fields/test/.eslintrc.json
generated
vendored
Normal file
5
node_modules/acorn-class-fields/test/.eslintrc.json
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"env": {
|
||||
"mocha": true
|
||||
}
|
||||
}
|
365
node_modules/acorn-class-fields/test/test.js
generated
vendored
Normal file
365
node_modules/acorn-class-fields/test/test.js
generated
vendored
Normal file
@@ -0,0 +1,365 @@
|
||||
"use strict"
|
||||
|
||||
const assert = require("assert")
|
||||
const acorn = require("acorn"), classFields = require("..")
|
||||
const Parser = acorn.Parser.extend(classFields)
|
||||
|
||||
function test(text, expectedResult, additionalOptions) {
|
||||
it(text, function () {
|
||||
const result = Parser.parse(text, Object.assign({ ecmaVersion: 9 }, additionalOptions))
|
||||
if (expectedResult) {
|
||||
assert.deepStrictEqual(result.body[0], expectedResult)
|
||||
}
|
||||
})
|
||||
}
|
||||
function testFail(text, expectedResult, additionalOptions) {
|
||||
it(text, function () {
|
||||
let msg = null
|
||||
try {
|
||||
Parser.parse(text, Object.assign({ ecmaVersion: 9 }, additionalOptions))
|
||||
} catch (e) {
|
||||
msg = e.message
|
||||
}
|
||||
assert.strictEqual(msg, expectedResult)
|
||||
})
|
||||
}
|
||||
const newNode = (start, props) => Object.assign(new acorn.Node({options: {}}, start), props)
|
||||
|
||||
describe("acorn-class-fields", function () {
|
||||
test(`class P extends Q {
|
||||
x = super.x
|
||||
}`)
|
||||
|
||||
test(`class Counter extends HTMLElement {
|
||||
x = 0;
|
||||
|
||||
clicked() {
|
||||
this.x++;
|
||||
}
|
||||
|
||||
render() {
|
||||
return this.x.toString();
|
||||
}
|
||||
}`)
|
||||
|
||||
test(`
|
||||
class AsyncIterPipe{
|
||||
static get [ Symbol.species](){
|
||||
return Promise
|
||||
}
|
||||
static get Closing(){
|
||||
return Closing
|
||||
}
|
||||
static get controllerSignals(){ return controllerSignals}
|
||||
static get listenerBinding(){ return listenerBinding}
|
||||
|
||||
// state
|
||||
done= false
|
||||
}
|
||||
`)
|
||||
|
||||
test(`class Counter extends HTMLElement {
|
||||
#x = 0;
|
||||
|
||||
clicked() {
|
||||
this.#x++;
|
||||
}
|
||||
|
||||
render() {
|
||||
return this.#x.toString();
|
||||
}
|
||||
}`)
|
||||
test("class A { a = this.#a; #a = 4 }")
|
||||
|
||||
test("class A { 5 = 5; #5 = 5 }")
|
||||
test("class A { delete = 5; #delete = 5 }")
|
||||
|
||||
testFail("class A { #a; f() { delete this.#a } }", "Private elements may not be deleted (1:20)")
|
||||
testFail("class A { #a; #a }", "Duplicate private element (1:14)")
|
||||
testFail("class A { a = this.#a }", "Usage of undeclared private name (1:19)")
|
||||
testFail("class A { a = this.#a; b = this.#b }", "Usage of undeclared private name (1:19)")
|
||||
testFail("class A { constructor = 4 }", "Classes may not have a field called constructor (1:10)")
|
||||
testFail("class A { #constructor = 4 }", "Classes may not have a private element named constructor (1:10)")
|
||||
testFail("class A { a = () => arguments }", "A class field initializer may not contain arguments (1:20)")
|
||||
testFail("class A { a = () => super() }", "super() call outside constructor of a subclass (1:20)")
|
||||
testFail("class A { # a }", "Unexpected token (1:10)")
|
||||
testFail("class A { #a; a() { this.# a } }", "Unexpected token (1:27)")
|
||||
|
||||
const classes = [
|
||||
{ text: "class A { %s }", ast: getBody => {
|
||||
const body = getBody(10)
|
||||
return newNode(0, {
|
||||
type: "ClassDeclaration",
|
||||
end: body.end + 2,
|
||||
id: newNode(6, {
|
||||
type: "Identifier",
|
||||
end: 7,
|
||||
name: "A"
|
||||
}),
|
||||
superClass: null,
|
||||
body: newNode(8, {
|
||||
type: "ClassBody",
|
||||
end: body.end + 2,
|
||||
body: [body]
|
||||
})
|
||||
})
|
||||
} },
|
||||
{ text: "class A { %s; }", ast: getBody => {
|
||||
const body = getBody(10)
|
||||
return newNode(0, {
|
||||
type: "ClassDeclaration",
|
||||
end: body.end + 3,
|
||||
id: newNode(6, {
|
||||
type: "Identifier",
|
||||
end: 7,
|
||||
name: "A"
|
||||
}),
|
||||
superClass: null,
|
||||
body: newNode(8, {
|
||||
type: "ClassBody",
|
||||
end: body.end + 3,
|
||||
body: [body]
|
||||
})
|
||||
})
|
||||
} },
|
||||
{ text: "class A { %s; #y }", ast: getBody => {
|
||||
const body = getBody(10)
|
||||
return newNode(0, {
|
||||
type: "ClassDeclaration",
|
||||
end: body.end + 6,
|
||||
id: newNode(6, {
|
||||
type: "Identifier",
|
||||
end: 7,
|
||||
name: "A"
|
||||
}),
|
||||
superClass: null,
|
||||
body: newNode(8, {
|
||||
type: "ClassBody",
|
||||
end: body.end + 6,
|
||||
body: [body, newNode(body.end + 2, {
|
||||
type: "FieldDefinition",
|
||||
end: body.end + 4,
|
||||
key: newNode(body.end + 2, {
|
||||
type: "PrivateName",
|
||||
end: body.end + 4,
|
||||
name: "y"
|
||||
}),
|
||||
value: null,
|
||||
computed: false
|
||||
}) ]
|
||||
})
|
||||
})
|
||||
} },
|
||||
{ text: "class A { %s;a() {} }", ast: getBody => {
|
||||
const body = getBody(10)
|
||||
return newNode(0, {
|
||||
type: "ClassDeclaration",
|
||||
end: body.end + 9,
|
||||
id: newNode(6, {
|
||||
type: "Identifier",
|
||||
end: 7,
|
||||
name: "A"
|
||||
}),
|
||||
superClass: null,
|
||||
body: newNode(8, {
|
||||
type: "ClassBody",
|
||||
end: body.end + 9,
|
||||
body: [ body, newNode(body.end + 1, {
|
||||
type: "MethodDefinition",
|
||||
end: body.end + 7,
|
||||
kind: "method",
|
||||
static: false,
|
||||
computed: false,
|
||||
key: newNode(body.end + 1, {
|
||||
type: "Identifier",
|
||||
end: body.end + 2,
|
||||
name: "a"
|
||||
}),
|
||||
value: newNode(body.end + 2, {
|
||||
type: "FunctionExpression",
|
||||
end: body.end + 7,
|
||||
id: null,
|
||||
generator: false,
|
||||
expression: false,
|
||||
async: false,
|
||||
params: [],
|
||||
body: newNode(body.end + 5, {
|
||||
type: "BlockStatement",
|
||||
end: body.end + 7,
|
||||
body: []
|
||||
})
|
||||
})
|
||||
}) ]
|
||||
})
|
||||
})
|
||||
} },
|
||||
{ text: "class A { %s\na() {} }", ast: getBody => {
|
||||
const body = getBody(10)
|
||||
return newNode(0, {
|
||||
type: "ClassDeclaration",
|
||||
end: body.end + 9,
|
||||
id: newNode(6, {
|
||||
type: "Identifier",
|
||||
end: 7,
|
||||
name: "A"
|
||||
}),
|
||||
superClass: null,
|
||||
body: newNode(8, {
|
||||
type: "ClassBody",
|
||||
end: body.end + 9,
|
||||
body: [
|
||||
body,
|
||||
newNode(body.end + 1, {
|
||||
type: "MethodDefinition",
|
||||
end: body.end + 7,
|
||||
kind: "method",
|
||||
static: false,
|
||||
computed: false,
|
||||
key: newNode(body.end + 1, {
|
||||
type: "Identifier",
|
||||
end: body.end + 2,
|
||||
name: "a"
|
||||
}),
|
||||
value: newNode(body.end + 2, {
|
||||
type: "FunctionExpression",
|
||||
end: body.end + 7,
|
||||
id: null,
|
||||
generator: false,
|
||||
expression: false,
|
||||
async: false,
|
||||
params: [],
|
||||
body: newNode(body.end + 5, {
|
||||
type: "BlockStatement",
|
||||
end: body.end + 7,
|
||||
body: []
|
||||
})
|
||||
})
|
||||
})
|
||||
]
|
||||
})
|
||||
})
|
||||
} },
|
||||
];
|
||||
|
||||
[
|
||||
{ body: "x", passes: true, ast: start => newNode(start, {
|
||||
type: "FieldDefinition",
|
||||
end: start + 1,
|
||||
key: newNode(start, {
|
||||
type: "Identifier",
|
||||
end: start + 1,
|
||||
name: "x"
|
||||
}),
|
||||
value: null,
|
||||
computed: false
|
||||
}) },
|
||||
{ body: "x = 0", passes: true, ast: start => newNode(start, {
|
||||
type: "FieldDefinition",
|
||||
end: start + 5,
|
||||
key: newNode(start, {
|
||||
type: "Identifier",
|
||||
end: start + 1,
|
||||
name: "x"
|
||||
}),
|
||||
value: newNode(start + 4, {
|
||||
type: "Literal",
|
||||
end: start + 5,
|
||||
value: 0,
|
||||
raw: "0"
|
||||
}),
|
||||
computed: false
|
||||
}) },
|
||||
{ body: "[x]", passes: true, ast: start => newNode(start, {
|
||||
type: "FieldDefinition",
|
||||
end: start + 3,
|
||||
computed: true,
|
||||
key: newNode(start + 1, {
|
||||
type: "Identifier",
|
||||
end: start + 2,
|
||||
name: "x"
|
||||
}),
|
||||
value: null
|
||||
}) },
|
||||
{ body: "[x] = 0", passes: true, ast: start => newNode(start, {
|
||||
type: "FieldDefinition",
|
||||
end: start + 7,
|
||||
computed: true,
|
||||
key: newNode(start + 1, {
|
||||
type: "Identifier",
|
||||
end: start + 2,
|
||||
name: "x"
|
||||
}),
|
||||
value: newNode(start + 6, {
|
||||
type: "Literal",
|
||||
end: start + 7,
|
||||
value: 0,
|
||||
raw: "0"
|
||||
})
|
||||
}) },
|
||||
{ body: "#x", passes: true, ast: start => newNode(start, {
|
||||
type: "FieldDefinition",
|
||||
end: start + 2,
|
||||
computed: false,
|
||||
key: newNode(start, {
|
||||
type: "PrivateName",
|
||||
end: start + 2,
|
||||
name: "x"
|
||||
}),
|
||||
value: null,
|
||||
}) },
|
||||
{ body: "#x = 0", passes: true, ast: start => newNode(start, {
|
||||
type: "FieldDefinition",
|
||||
end: start + 6,
|
||||
computed: false,
|
||||
key: newNode(start, {
|
||||
type: "PrivateName",
|
||||
end: start + 2,
|
||||
name: "x"
|
||||
}),
|
||||
value: newNode(start + 5, {
|
||||
type: "Literal",
|
||||
end: start + 6,
|
||||
value: 0,
|
||||
raw: "0"
|
||||
})
|
||||
}) },
|
||||
|
||||
{ body: "async", passes: true, ast: start => newNode(start, {
|
||||
type: "FieldDefinition",
|
||||
end: start + 5,
|
||||
key: newNode(start, {
|
||||
type: "Identifier",
|
||||
end: start + 5,
|
||||
name: "async"
|
||||
}),
|
||||
value: null,
|
||||
computed: false
|
||||
}) },
|
||||
|
||||
{ body: "async = 5", passes: true, ast: start => newNode(start, {
|
||||
type: "FieldDefinition",
|
||||
end: start + 9,
|
||||
key: newNode(start, {
|
||||
type: "Identifier",
|
||||
end: start + 5,
|
||||
name: "async"
|
||||
}),
|
||||
value: newNode(start + 8, {
|
||||
type: "Literal",
|
||||
end: start + 9,
|
||||
raw: "5",
|
||||
value: 5
|
||||
}),
|
||||
computed: false
|
||||
}) },
|
||||
].forEach(bodyInput => {
|
||||
const body = bodyInput.body, passes = bodyInput.passes, bodyAst = bodyInput.ast
|
||||
classes.forEach(input => {
|
||||
const text = input.text, options = input.options || {}, ast = input.ast;
|
||||
(passes ? test : testFail)(text.replace("%s", body), ast(bodyAst), options)
|
||||
})
|
||||
})
|
||||
|
||||
testFail("class C { \\u0061sync m(){} };", "Unexpected token (1:21)")
|
||||
test("class A extends B { constructor() { super() } }")
|
||||
})
|
0
node_modules/acorn-class-fields/test262.whitelist
generated
vendored
Normal file
0
node_modules/acorn-class-fields/test262.whitelist
generated
vendored
Normal file
28
node_modules/acorn-dynamic-import/CHANGELOG.md
generated
vendored
Normal file
28
node_modules/acorn-dynamic-import/CHANGELOG.md
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
# 4.0.0
|
||||
|
||||
- Updating to Acorn 6.
|
||||
|
||||
# 3.0.0
|
||||
|
||||
- Adding acorn walk support.
|
||||
- Bump acorn version.
|
||||
|
||||
# 2.0.2
|
||||
|
||||
- Fixing parsing of `yield import()`.
|
||||
|
||||
# 2.0.1
|
||||
|
||||
- Removing unnecessary `in-publish` dependency.
|
||||
|
||||
# 2.0.0
|
||||
|
||||
- Updating acorn version to >= 4.
|
||||
|
||||
# 1.0.1
|
||||
|
||||
- Fixes for publishing the module.
|
||||
|
||||
# 1.0.0
|
||||
|
||||
- Initial release of plugin.
|
21
node_modules/acorn-dynamic-import/LICENSE
generated
vendored
Normal file
21
node_modules/acorn-dynamic-import/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2016 Jordan Gensler
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
29
node_modules/acorn-dynamic-import/README.md
generated
vendored
Normal file
29
node_modules/acorn-dynamic-import/README.md
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
# Dynamic import support in acorn
|
||||
|
||||
This is plugin for [Acorn](http://marijnhaverbeke.nl/acorn/) - a tiny, fast JavaScript parser, written completely in JavaScript.
|
||||
|
||||
For more information, check out the [proposal repo](https://github.com/tc39/proposal-dynamic-import).
|
||||
|
||||
## Usage
|
||||
|
||||
Importing this module gives you a plugin that can be used to extend an Acorn parser:
|
||||
|
||||
```js
|
||||
import Parser from 'acorn';
|
||||
import dynamicImport from 'acorn-dynamic-import';
|
||||
|
||||
Parser.extend(dynamicImport).parse('import("something");');
|
||||
```
|
||||
|
||||
To extend the AST walker for dynamic imports, you can injecting the new node type into [`acorn-walk`](https://www.npmjs.com/package/acorn-walk) like this:
|
||||
|
||||
```js
|
||||
import inject from 'acorn-dynamic-import/lib/walk';
|
||||
import * as acornWalk from 'acorn-walk';
|
||||
|
||||
const walk = inject(acornWalk);
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
This plugin is issued under the [MIT license](./LICENSE).
|
84
node_modules/acorn-dynamic-import/lib/index.js
generated
vendored
Normal file
84
node_modules/acorn-dynamic-import/lib/index.js
generated
vendored
Normal file
@@ -0,0 +1,84 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.DynamicImportKey = undefined;
|
||||
|
||||
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; }; }();
|
||||
|
||||
var _get = function () {
|
||||
function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }
|
||||
|
||||
return get;
|
||||
}();
|
||||
|
||||
exports['default'] = dynamicImport;
|
||||
|
||||
var _acorn = require('acorn');
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /* eslint-disable no-underscore-dangle */
|
||||
|
||||
|
||||
var DynamicImportKey = exports.DynamicImportKey = 'Import';
|
||||
|
||||
// NOTE: This allows `yield import()` to parse correctly.
|
||||
_acorn.tokTypes._import.startsExpr = true;
|
||||
|
||||
function parseDynamicImport() {
|
||||
var node = this.startNode();
|
||||
this.next();
|
||||
if (this.type !== _acorn.tokTypes.parenL) {
|
||||
this.unexpected();
|
||||
}
|
||||
return this.finishNode(node, DynamicImportKey);
|
||||
}
|
||||
|
||||
function parenAfter() {
|
||||
return (/^(\s|\/\/.*|\/\*[^]*?\*\/)*\(/.test(this.input.slice(this.pos))
|
||||
);
|
||||
}
|
||||
|
||||
function dynamicImport(Parser) {
|
||||
return function (_Parser) {
|
||||
_inherits(_class, _Parser);
|
||||
|
||||
function _class() {
|
||||
_classCallCheck(this, _class);
|
||||
|
||||
return _possibleConstructorReturn(this, (_class.__proto__ || Object.getPrototypeOf(_class)).apply(this, arguments));
|
||||
}
|
||||
|
||||
_createClass(_class, [{
|
||||
key: 'parseStatement',
|
||||
value: function () {
|
||||
function parseStatement(context, topLevel, exports) {
|
||||
if (this.type === _acorn.tokTypes._import && parenAfter.call(this)) {
|
||||
return this.parseExpressionStatement(this.startNode(), this.parseExpression());
|
||||
}
|
||||
return _get(_class.prototype.__proto__ || Object.getPrototypeOf(_class.prototype), 'parseStatement', this).call(this, context, topLevel, exports);
|
||||
}
|
||||
|
||||
return parseStatement;
|
||||
}()
|
||||
}, {
|
||||
key: 'parseExprAtom',
|
||||
value: function () {
|
||||
function parseExprAtom(refDestructuringErrors) {
|
||||
if (this.type === _acorn.tokTypes._import) {
|
||||
return parseDynamicImport.call(this);
|
||||
}
|
||||
return _get(_class.prototype.__proto__ || Object.getPrototypeOf(_class.prototype), 'parseExprAtom', this).call(this, refDestructuringErrors);
|
||||
}
|
||||
|
||||
return parseExprAtom;
|
||||
}()
|
||||
}]);
|
||||
|
||||
return _class;
|
||||
}(Parser);
|
||||
}
|
16
node_modules/acorn-dynamic-import/lib/walk.js
generated
vendored
Normal file
16
node_modules/acorn-dynamic-import/lib/walk.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports['default'] = inject;
|
||||
|
||||
var _index = require('./index');
|
||||
|
||||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
|
||||
function inject(injectableWalk) {
|
||||
return Object.assign({}, injectableWalk, {
|
||||
base: Object.assign({}, injectableWalk.base, _defineProperty({}, _index.DynamicImportKey, function () {}))
|
||||
});
|
||||
}
|
83
node_modules/acorn-dynamic-import/package.json
generated
vendored
Normal file
83
node_modules/acorn-dynamic-import/package.json
generated
vendored
Normal file
@@ -0,0 +1,83 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"acorn-dynamic-import@4.0.0",
|
||||
"D:\\Projects\\siag\\vanillajs-seed"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
"_from": "acorn-dynamic-import@4.0.0",
|
||||
"_id": "acorn-dynamic-import@4.0.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-d3OEjQV4ROpoflsnUA8HozoIR504TFxNivYEUi6uwz0IYhBkTDXGuWlNdMtybRt3nqVx/L6XqMt0FxkXuWKZhw==",
|
||||
"_location": "/acorn-dynamic-import",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "acorn-dynamic-import@4.0.0",
|
||||
"name": "acorn-dynamic-import",
|
||||
"escapedName": "acorn-dynamic-import",
|
||||
"rawSpec": "4.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "4.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/acorn-stage3",
|
||||
"/i18next-scanner"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-4.0.0.tgz",
|
||||
"_spec": "4.0.0",
|
||||
"_where": "D:\\Projects\\siag\\vanillajs-seed",
|
||||
"author": {
|
||||
"name": "Jordan Gensler",
|
||||
"email": "jordangens@gmail.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/kesne/acorn-dynamic-import/issues"
|
||||
},
|
||||
"description": "Support dynamic imports in acorn",
|
||||
"devDependencies": {
|
||||
"acorn": "^6.0.0",
|
||||
"acorn-walk": "^6.0.0",
|
||||
"babel-cli": "^6.18.0",
|
||||
"babel-eslint": "^7.1.1",
|
||||
"babel-preset-airbnb": "^2.1.1",
|
||||
"babel-register": "^6.18.0",
|
||||
"chai": "^3.0.0",
|
||||
"eslint": "^3.10.2",
|
||||
"eslint-config-airbnb-base": "^10.0.1",
|
||||
"eslint-plugin-import": "^2.2.0",
|
||||
"in-publish": "^2.0.0",
|
||||
"mocha": "^5.2.0",
|
||||
"rimraf": "^2.5.4",
|
||||
"safe-publish-latest": "^1.1.1"
|
||||
},
|
||||
"homepage": "https://github.com/kesne/acorn-dynamic-import",
|
||||
"license": "MIT",
|
||||
"main": "lib/index.js",
|
||||
"name": "acorn-dynamic-import",
|
||||
"peerDependencies": {
|
||||
"acorn": "^6.0.0"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/kesne/acorn-dynamic-import.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "babel src --out-dir lib",
|
||||
"check-changelog": "expr $(git status --porcelain 2>/dev/null| grep \"^\\s*M.*CHANGELOG.md\" | wc -l) >/dev/null || (echo 'Please edit CHANGELOG.md' && exit 1)",
|
||||
"check-only-changelog-changed": "(expr $(git status --porcelain 2>/dev/null| grep -v \"CHANGELOG.md\" | wc -l) >/dev/null && echo 'Only CHANGELOG.md may have uncommitted changes' && exit 1) || exit 0",
|
||||
"lint": "eslint .",
|
||||
"postversion": "git commit package.json CHANGELOG.md -m \"v$npm_package_version\" && npm run tag && git push && git push --tags",
|
||||
"prepublish": "in-publish && safe-publish-latest && npm run build || not-in-publish",
|
||||
"preversion": "npm run test && npm run check-changelog && npm run check-only-changelog-changed",
|
||||
"tag": "git tag v$npm_package_version",
|
||||
"test": "npm run lint && npm run tests-only",
|
||||
"tests-only": "mocha",
|
||||
"version:major": "npm --no-git-tag-version version major",
|
||||
"version:minor": "npm --no-git-tag-version version minor",
|
||||
"version:patch": "npm --no-git-tag-version version patch"
|
||||
},
|
||||
"version": "4.0.0"
|
||||
}
|
38
node_modules/acorn-dynamic-import/src/index.js
generated
vendored
Normal file
38
node_modules/acorn-dynamic-import/src/index.js
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
/* eslint-disable no-underscore-dangle */
|
||||
import { tokTypes as tt } from 'acorn';
|
||||
|
||||
export const DynamicImportKey = 'Import';
|
||||
|
||||
// NOTE: This allows `yield import()` to parse correctly.
|
||||
tt._import.startsExpr = true;
|
||||
|
||||
function parseDynamicImport() {
|
||||
const node = this.startNode();
|
||||
this.next();
|
||||
if (this.type !== tt.parenL) {
|
||||
this.unexpected();
|
||||
}
|
||||
return this.finishNode(node, DynamicImportKey);
|
||||
}
|
||||
|
||||
function parenAfter() {
|
||||
return /^(\s|\/\/.*|\/\*[^]*?\*\/)*\(/.test(this.input.slice(this.pos));
|
||||
}
|
||||
|
||||
export default function dynamicImport(Parser) {
|
||||
return class extends Parser {
|
||||
parseStatement(context, topLevel, exports) {
|
||||
if (this.type === tt._import && parenAfter.call(this)) {
|
||||
return this.parseExpressionStatement(this.startNode(), this.parseExpression());
|
||||
}
|
||||
return super.parseStatement(context, topLevel, exports);
|
||||
}
|
||||
|
||||
parseExprAtom(refDestructuringErrors) {
|
||||
if (this.type === tt._import) {
|
||||
return parseDynamicImport.call(this);
|
||||
}
|
||||
return super.parseExprAtom(refDestructuringErrors);
|
||||
}
|
||||
};
|
||||
}
|
9
node_modules/acorn-dynamic-import/src/walk.js
generated
vendored
Normal file
9
node_modules/acorn-dynamic-import/src/walk.js
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import { DynamicImportKey } from './index';
|
||||
|
||||
export default function inject(injectableWalk) {
|
||||
return Object.assign({}, injectableWalk, {
|
||||
base: Object.assign({}, injectableWalk.base, {
|
||||
[DynamicImportKey]() {},
|
||||
}),
|
||||
});
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user