aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKumar Priyansh <[email protected]>2019-12-27 02:54:06 +0530
committerKumar Priyansh <[email protected]>2019-12-27 02:54:06 +0530
commit2cfb3542f4676f985cce061208b72e4bf8e79a92 (patch)
tree46fa6db4c8fe0630b6b17a1185cba6e44f183b10
parentd2588d3a1db223faee3f501832c3b009b961bf54 (diff)
downloadnativekit-2cfb3542f4676f985cce061208b72e4bf8e79a92.tar.xz
nativekit-2cfb3542f4676f985cce061208b72e4bf8e79a92.zip
Updated text to show colored text after building
-rw-r--r--index.js102
1 files changed, 56 insertions, 46 deletions
diff --git a/index.js b/index.js
index 524be13..f2f6842 100644
--- a/index.js
+++ b/index.js
@@ -1,65 +1,75 @@
const makeDir = require('make-dir');
var ncp = require('ncp').ncp;
-
+var colors = require('colors');
+
function buildForMac() {
- (async () => {
- const path = await makeDir('build');
-
- console.log('Created directory \'build\' at path: ' + path);
- })();
+ (async () => {
+ const path = await makeDir('build');
+
+ console.log('Created directory \'build\' at path: ' + path);
+ })();
- ncp('dist/mac/', 'build', function (err) {
- if (err) {
- return console.error(err);
- }
- console.log('Native Kit is built for macOS now. You can use the \'build\' directory directly to your project. \n\nFiles you need to include in your project are:\n\n1. build => css => all.css\n2. build => scripts => nativekit.js\nDon\'t delete the fonts directory.\n\nDon\'t forget to support the project if you like it! Go ahead contribute to it or star it on Github or better if you can spare some change, then donate at the following URL: \nhttps://www.paypal.me/kumarpriyansh\n\nVisit the Native Kit website for documentation at: \nhttps://www.nativekit.co.\n\nThank you for using Native Kit.');
- });
+ ncp('dist/mac/', 'build', function (err) {
+ if (err) {
+ return console.error(err);
+ }
+ console.log('\n\n');
+ console.log('Native Kit is built for macOS now.'.brightGreen)
+ console.log('\n\n');
+ console.log('You can use the ' + 'build'.brightGreen + ' directory directly to your project. \n\nFiles you need to include in your project are:\n\n' + '1. build => css => all.css'.brightCyan + '\n' + '2. build => scripts => nativekit.js'.brightCyan + '\n' + 'Don\'t delete the fonts directory.'.brightMagenta + '\n\nDon\'t forget to support the project if you like it! Go ahead contribute to it or ' + 'star it on Github'.brightYellow + ' or better if you can spare some change, then donate at the following URL: \n' + 'https://www.paypal.me/kumarpriyansh'.brightYellow + '\n\nVisit the Native Kit website for documentation at: \n' + 'https://www.nativekit.co'.brightYellow + '\n\nThank you for using Native Kit.');
+ });
}
function buildForWin() {
- (async () => {
- const path = await makeDir('build');
-
- console.log('Created directory \'build\' at path: ' + path);
- })();
+ (async () => {
+ const path = await makeDir('build');
+
+ console.log('Created directory \'build\' at path: ' + path);
+ })();
- ncp('dist/windows/', 'build', function (err) {
- if (err) {
- return console.error(err);
- }
- console.log('Native Kit is built for Windows 10 now. You can use the \'build\' directory directly to your project. \n\nFiles you need to include in your project are:\n\n1. build => css => all.css\n2. build => scripts => nativekit.js\nDon\'t delete the fonts directory.\n\nDon\'t forget to support the project if you like it! Go ahead contribute to it or star it on Github or better if you can spare some change, then donate at the following URL: \nhttps://www.paypal.me/kumarpriyansh\n\nVisit the Native Kit website for documentation at: \nhttps://www.nativekit.co.\n\nThank you for using Native Kit.');
- });
+ ncp('dist/windows/', 'build', function (err) {
+ if (err) {
+ return console.error(err);
+ }
+ console.log('\n\n');
+ console.log('Native Kit is built for Windows 10 now.'.brightGreen)
+ console.log('\n\n');
+ console.log('You can use the ' + 'build'.brightGreen + ' directory directly to your project. \n\nFiles you need to include in your project are:\n\n' + '1. build => css => all.css'.brightCyan + '\n' + '2. build => scripts => nativekit.js'.brightCyan + '\n' + 'Don\'t delete the fonts directory.'.brightMagenta + '\n\nDon\'t forget to support the project if you like it! Go ahead contribute to it or ' + 'star it on Github'.brightYellow + ' or better if you can spare some change, then donate at the following URL: \n' + 'https://www.paypal.me/kumarpriyansh'.brightYellow + '\n\nVisit the Native Kit website for documentation at: \n' + 'https://www.nativekit.co'.brightYellow + '\n\nThank you for using Native Kit.');
+ });
}
function build() {
- (async () => {
- const path = await makeDir('build');
-
- console.log('Created directory \'build\' at path: ' + path);
- })();
+ (async () => {
+ const path = await makeDir('build');
+
+ console.log('Created directory \'build\' at path: ' + path);
+ })();
- ncp('dist/', 'build', function (err) {
- if (err) {
- return console.error(err);
- }
- console.log('Native Kit is built for both macOS and Windows 10 now. You can use the \'build\' directory directly to your project. \n\nFiles you need to include in your project are:\n\n1. build => (mac/windows) => css => all.css\n2. build => (mac/windows) => scripts => nativekit.js\nDon\'t delete the fonts directory.\n\nDon\'t forget to support the project if you like it! Go ahead contribute to it or star it on Github or better if you can spare some change, then donate at the following URL: \nhttps://www.paypal.me/kumarpriyansh\n\nVisit the Native Kit website for documentation at: \nhttps://www.nativekit.co.\n\nThank you for using Native Kit.');
- });
+ ncp('dist/', 'build', function (err) {
+ if (err) {
+ return console.error(err);
+ }
+ console.log('\n\n');
+ console.log('Native Kit is built for both macOS and Windows10 now.'.brightGreen)
+ console.log('\n\n');
+ console.log('You can use the ' + 'build'.brightGreen + ' directory directly to your project. \n\nFiles you need to include in your project are:\n\n' + '1. build => (mac/windows) => css => all.css'.brightCyan + '\n' + '2. build => (mac/windows) => scripts => nativekit.js'.brightCyan + '\n' + 'Don\'t delete the fonts directory.'.brightMagenta + '\n\nDon\'t forget to support the project if you like it! Go ahead contribute to it or ' + 'star it on Github'.brightYellow + ' or better if you can spare some change, then donate at the following URL: \n' + 'https://www.paypal.me/kumarpriyansh'.brightYellow + '\n\nVisit the Native Kit website for documentation at: \n' + 'https://www.nativekit.co'.brightYellow + '\n\nThank you for using Native Kit.');
+ });
}
-for (var i=0; i<process.argv.length;i++) {
- switch (process.argv[i]) {
- case 'buildForMac':
- buildForMac();
- break;
+for (var i = 0; i < process.argv.length; i++) {
+ switch (process.argv[i]) {
+ case 'buildForMac':
+ buildForMac();
+ break;
- case 'buildForWin':
- buildForWin();
- break;
+ case 'buildForWin':
+ buildForWin();
+ break;
- case 'build':
- build();
- break;
- }
+ case 'build':
+ build();
+ break;
+ }
}
module.exports.buildForMac = buildForMac;