cordova-import-npm
Advanced tools
Comparing version 1.0.15 to 1.0.16
{ | ||
"name": "cordova-import-npm", | ||
"version": "1.0.15", | ||
"version": "1.0.16", | ||
"description": "Import files from npm packages into your cordova www directory automatically, upon cordova prepare or cordova build", | ||
@@ -5,0 +5,0 @@ "scripts": { |
#!/usr/bin/env node | ||
// const fs = require('fs') | ||
const fs = require('fs') | ||
// const fse = require('fs-extra') | ||
// const path = require('path') | ||
const path = require('path') | ||
const colors = require('colors/safe') | ||
// const xml2js = require('xml2js') | ||
// const parser = new xml2js.Parser() | ||
const xml2js = require('xml2js') | ||
const parser = new xml2js.Parser() | ||
// const isTest = process.argv[2] === '--test' | ||
const isTest = process.argv[2] === '--test' | ||
console.log('Postinstall script running on ' + colors.cyan(process.env.INIT_CWD)) | ||
process.exitCode = 0 | ||
/* | ||
var configXmlFileName = isTest ? path.join(__dirname, '..', 'test', 'config.xml') : 'config.xml' | ||
const configXmlFileName = isTest | ||
? path.join(__dirname, '..', 'test', 'config.xml') | ||
: path.join(process.env.INIT_CWD, 'config.xml') | ||
console.log(`Reading file ${colors.cyan(configXmlFileName)}`) | ||
var rawdata = fs.readFileSync(configXmlFileName, 'utf8') | ||
const rawdata = fs.readFileSync(configXmlFileName, 'utf8') | ||
parser.parseString(rawdata, function (err, result) { | ||
@@ -34,2 +35,1 @@ if (err) { | ||
}) | ||
*/ |
357048
6