Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
CB-7341 Port tooling/platform scripts from WSH to NodeJS
  • Loading branch information
Vladimir Kotikov committed Aug 20, 2014
1 parent 0cd48c8 commit c2c2e564ba32bdb3599b31d36e705acc9d015c3b
Showing 219 changed files with 18,171 additions and 2,448 deletions.
@@ -12,8 +12,6 @@ Thumbs.db

# Ignore template zip files
*.zip



# Other useful stuff
*.bak
@@ -24,14 +22,5 @@ Thumbs.db

*.DS_Store

wp8/node_modules/


#We want to allow some bin folders ...
!wp8/bin/






@@ -1,24 +1,34 @@
#! /bin/sh
#!/usr/bin/env node

#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
echo "ERROR: Cordova tooling for Windows Phone requires a Windows OS with the 'msbuild' command "
echo " in the PATH environment variable as well as having .NET Framework 4.0 (from WP SDK's)"
exit 1
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
*/

var check_reqs = require('./lib/check_reqs');

// check for help flag
if (['--help', '/?', '-h', 'help', '-help', '/help'].indexOf(process.argv[2]) > -1) {
check_reqs.help();
} else {
check_reqs.run().done(function success(msbuild) {
console.log('Environment is supported; found MSBuild Tools version ' + msbuild.version + ' at ' + msbuild.path);
}, function (err) {
console.error('Failed to check requirements due to', err);
process.exit(2);
});
}
@@ -19,11 +19,12 @@ goto endheader
# under the License.
#
:endheader
SET script_path="%~dp0check_reqs.js"

SET script_path="%~dp0check_reqs"
IF EXIST %script_path% (
cscript %script_path% %* //nologo
node %script_path% %*
) ELSE (
ECHO.
ECHO ERROR: Could not find 'check_reqs.js' in 'bin' folder, aborting...>&2
ECHO ERROR: Could not find 'check_reqs' in 'bin' folder, aborting...>&2
EXIT /B 1
)

This file was deleted.

@@ -0,0 +1,38 @@
#!/usr/bin/env node

/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
*/

/*
* create a cordova/windows8 project
* USAGE
* ./create [path package activity]
* ./bin/create.bat C:\Users\Me\MyTestProj "test.proj" "TestProject"
*/

var create = require('./lib/create');

if (['--help', '/?', '-h', 'help', '-help', '/help'].indexOf(process.argv[2]) > -1) {
create.help();
} else {
create.run(process.argv).done(null, function (err) {
console.error('Failed to create project due to', err);
process.exit(2);
});
}
@@ -19,11 +19,12 @@ goto endheader
# under the License.
#
:endheader

SET full_path=%~dp0
IF EXIST "%full_path%create.js" (
cscript "%full_path%create.js" %* //nologo
IF EXIST "%full_path%create" (
node "%full_path%create" %*
) ELSE (
ECHO.
ECHO ERROR: Could not find 'create.js' in 'bin' folder, aborting...>&2
ECHO ERROR: Could not find 'create' in 'bin' folder, aborting...>&2
EXIT /B 1
)

0 comments on commit c2c2e56

Please sign in to comment.