mirror of
https://github.com/showdownjs/showdown.git
synced 2024-03-22 13:30:55 +08:00
parent
b3dd26a3a5
commit
f8c4bd26fc
BIN
bin/showdown.js
BIN
bin/showdown.js
Binary file not shown.
BIN
dist/showdown.js
vendored
BIN
dist/showdown.js
vendored
Binary file not shown.
BIN
dist/showdown.min.js
vendored
BIN
dist/showdown.min.js
vendored
Binary file not shown.
4
package-lock.json
generated
4
package-lock.json
generated
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "showdown",
|
"name": "showdown",
|
||||||
"version": "2.0.1",
|
"version": "2.0.2",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "showdown",
|
"name": "showdown",
|
||||||
"version": "2.0.1",
|
"version": "2.0.2",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"commander": "^9.0.0"
|
"commander": "^9.0.0"
|
||||||
|
|
|
@ -2,19 +2,22 @@
|
||||||
* Created by tivie
|
* Created by tivie
|
||||||
*/
|
*/
|
||||||
var fs = require('fs'),
|
var fs = require('fs'),
|
||||||
|
path = require('path'),
|
||||||
json = JSON.parse(fs.readFileSync('package.json', 'utf8')),
|
json = JSON.parse(fs.readFileSync('package.json', 'utf8')),
|
||||||
version = json.version,
|
version = json.version,
|
||||||
Command = require('commander').Command,
|
Command = require('commander').Command,
|
||||||
program = new Command(),
|
program = new Command(),
|
||||||
|
path1 = path.resolve(__dirname + '/../dist/showdown.js'),
|
||||||
|
path2 = path.resolve(__dirname + '/../../.build/showdown.js'),
|
||||||
showdown;
|
showdown;
|
||||||
|
|
||||||
// require shodown. We use conditional loading for each use case
|
// require shodown. We use conditional loading for each use case
|
||||||
if (fs.existsSync('../dist/showdown.js')) {
|
if (fs.existsSync(path1)) {
|
||||||
// production. File lives in bin directory
|
// production. File lives in bin directory
|
||||||
showdown = require('../dist/showdown');
|
showdown = require(path1);
|
||||||
} else if (fs.existsSync('../../.build/showdown.js')) {
|
} else if (fs.existsSync(path2)) {
|
||||||
// testing envo, uses the concatenated stuff for testing
|
// testing envo, uses the concatenated stuff for testing
|
||||||
showdown = require('../../.build/showdown.js');
|
showdown = require(path2);
|
||||||
} else {
|
} else {
|
||||||
// cold testing (manual) of cli.js in the src file. We load the dist file
|
// cold testing (manual) of cli.js in the src file. We load the dist file
|
||||||
showdown = require('../../dist/showdown');
|
showdown = require('../../dist/showdown');
|
||||||
|
|
Loading…
Reference in New Issue
Block a user