-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #92 from omarduarte/refactor-file-structure
Refactors models and file structure
- Loading branch information
Showing
668 changed files
with
129,978 additions
and
291 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"directory": "client/www/lib" | ||
"directory": "www/lib" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/env node | ||
|
||
/** | ||
* Install all plugins listed in package.json | ||
* https://raw.githubusercontent.com/diegonetto/generator-ionic/master/templates/hooks/after_platform_add/install_plugins.js | ||
*/ | ||
var exec = require('child_process').exec; | ||
var path = require('path'); | ||
var sys = require('sys'); | ||
|
||
var packageJSON = null; | ||
|
||
try { | ||
packageJSON = require('../../package.json'); | ||
} catch(ex) { | ||
console.log('\nThere was an error fetching your package.json file.') | ||
console.log('\nPlease ensure a valid package.json is in the root of this project\n') | ||
return; | ||
} | ||
|
||
var cmd = process.platform === 'win32' ? 'cordova.cmd' : 'cordova'; | ||
// var script = path.resolve(__dirname, '../../node_modules/cordova/bin', cmd); | ||
|
||
packageJSON.cordovaPlugins = packageJSON.cordovaPlugins || []; | ||
packageJSON.cordovaPlugins.forEach(function (plugin) { | ||
exec('cordova plugin add ' + plugin, function (error, stdout, stderr) { | ||
sys.puts(stdout); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env node | ||
|
||
/** | ||
* Push plugins to cordovaPlugins array after_plugin_add | ||
*/ | ||
var fs = require('fs'); | ||
var packageJSON = require('../../package.json'); | ||
|
||
packageJSON.cordovaPlugins = packageJSON.cordovaPlugins || []; | ||
process.env.CORDOVA_PLUGINS.split(',').forEach(function (plugin) { | ||
if(packageJSON.cordovaPlugins.indexOf(plugin) == -1) { | ||
packageJSON.cordovaPlugins.push(plugin); | ||
} | ||
}); | ||
|
||
fs.writeFileSync('package.json', JSON.stringify(packageJSON, null, 2)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env node | ||
|
||
/** | ||
* Remove plugins from cordovaPlugins array after_plugin_rm | ||
*/ | ||
var fs = require('fs'); | ||
var packageJSON = require('../../package.json'); | ||
|
||
packageJSON.cordovaPlugins = packageJSON.cordovaPlugins || []; | ||
|
||
process.env.CORDOVA_PLUGINS.split(',').forEach(function (plugin) { | ||
var index = packageJSON.cordovaPlugins.indexOf(plugin); | ||
if (index > -1) { | ||
packageJSON.cordovaPlugins.splice(index, 1); | ||
} | ||
}); | ||
|
||
fs.writeFile('package.json', JSON.stringify(packageJSON, null, 2)); |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/env node | ||
|
||
/** | ||
* After prepare, files are copied to the platforms/ios and platforms/android folders. | ||
* Lets clean up some of those files that arent needed with this hook. | ||
*/ | ||
var fs = require('fs'); | ||
var path = require('path'); | ||
|
||
var deleteFolderRecursive = function(removePath) { | ||
if( fs.existsSync(removePath) ) { | ||
fs.readdirSync(removePath).forEach(function(file,index){ | ||
var curPath = path.join(removePath, file); | ||
if(fs.lstatSync(curPath).isDirectory()) { // recurse | ||
deleteFolderRecursive(curPath); | ||
} else { // delete file | ||
fs.unlinkSync(curPath); | ||
} | ||
}); | ||
fs.rmdirSync(removePath); | ||
} | ||
}; | ||
|
||
var iosPlatformsDir = path.resolve(__dirname, '../../platforms/ios/www/lib/ionic/scss'); | ||
var androidPlatformsDir = path.resolve(__dirname, '../../platforms/android/assets/www/lib/ionic/scss'); | ||
|
||
deleteFolderRecursive(iosPlatformsDir); | ||
deleteFolderRecursive(androidPlatformsDir); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/env node | ||
|
||
/** | ||
* On a fresh clone, the local platforms/ and plugins/ directories will be | ||
* missing, so ensure they get created before the first platform is added. | ||
*/ | ||
var fs = require('fs'); | ||
var path = require('path'); | ||
|
||
var platformsDir = path.resolve(__dirname, '../../platforms'); | ||
var pluginsDir = path.resolve(__dirname, '../../plugins'); | ||
|
||
try { | ||
fs.mkdirSync(platformsDir, function (err) { | ||
if (err) { console.error(err); } | ||
}); | ||
} catch(ex) {} | ||
|
||
try { | ||
fs.mkdirSync(pluginsDir, function (err) { | ||
if (err) { console.error(err); } | ||
}); | ||
} catch(ex) {} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.