node_modules.source-map-support.build.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of apollo-client-maven-plugin Show documentation
Show all versions of apollo-client-maven-plugin Show documentation
Maven plugin for generating graphql clients
#!/usr/bin/env node
var fs = require('fs');
var path = require('path');
var querystring = require('querystring');
var child_process = require('child_process');
var browserify = path.resolve(path.join('node_modules', '.bin', 'browserify'));
var webpack = path.resolve(path.join('node_modules', '.bin', 'webpack'));
var coffee = path.resolve(path.join('node_modules', '.bin', 'coffee'));
function run(command, callback) {
console.log(command);
child_process.exec(command, callback);
}
// Use browserify to package up source-map-support.js
fs.writeFileSync('.temp.js', 'sourceMapSupport = require("./source-map-support");');
run(browserify + ' .temp.js', function(error, stdout) {
if (error) throw error;
// Wrap the code so it works both as a normal