Skip to content

Commit

Permalink
Start
Browse files Browse the repository at this point in the history
Início do projeto.
  • Loading branch information
cesarvelame committed Sep 13, 2019
1 parent a882a44 commit 535ba3f
Show file tree
Hide file tree
Showing 2,544 changed files with 429,405 additions and 0 deletions.
734 changes: 734 additions & 0 deletions platforms/browser/browser.json

Large diffs are not rendered by default.

26 changes: 26 additions & 0 deletions platforms/browser/config.xml
@@ -0,0 +1,26 @@
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.phonegap.helloworld" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0" xmlns:gap="http://phonegap.com/ns/1.0">
<feature name="Camera">
<param name="browser-package" value="Camera" />
</feature>
<feature name="Device">
<param name="browser-package" value="Device" />
</feature>
<name>Tablet</name>
<description>
Tablet da ASCOM.
</description>
<author email="ascom@ufrb.edu.rb" href="https://ufrb.edu.br/ascom">
ASCOM
</author>
<content src="index.html" />
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<preference name="DisallowOverscroll" value="true" />
<preference name="android-minSdkVersion" value="14" />
</widget>
34 changes: 34 additions & 0 deletions platforms/browser/cordova/build
@@ -0,0 +1,34 @@
#!/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.
*/


var build = require('./lib/build'),
args = process.argv;

// provide help
if ( args[2] == '--help' || args[2] == '/?' || args[2] == '-h' || args[2] == '/h' ||
args[2] == 'help' || args[2] == '-help' || args[2] == '/help') {
build.help();
process.exit(0);
} else {

build.run();
}
26 changes: 26 additions & 0 deletions platforms/browser/cordova/build.bat
@@ -0,0 +1,26 @@
:: 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.

@ECHO OFF
SET script_path="%~dp0build"
IF EXIST %script_path% (
node %script_path% %*
) ELSE (
ECHO.
ECHO ERROR: Could not find 'build' script in 'cordova' folder, aborting...>&2
EXIT /B 1
)
37 changes: 37 additions & 0 deletions platforms/browser/cordova/clean
@@ -0,0 +1,37 @@
#!/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.
*/


var path = require('path'),
clean = require('./lib/clean'),
reqs = require('./lib/check_reqs'),
args = process.argv;

// Support basic help commands
if ( args.length > 2
|| args[2] == '--help' || args[2] == '/?' || args[2] == '-h' ||
args[2] == 'help' || args[2] == '-help' || args[2] == '/help') {
console.log('Usage: ' + path.relative(process.cwd(), path.join(__dirname, 'clean')) );
process.exit(0);
} else {
clean.cleanProject();
}

22 changes: 22 additions & 0 deletions platforms/browser/cordova/defaults.xml
@@ -0,0 +1,22 @@
<?xml version='1.0' encoding='utf-8'?>
<!--
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.
-->
<widget id="io.cordova.hellocordova" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">

</widget>
65 changes: 65 additions & 0 deletions platforms/browser/cordova/lib/build.js
@@ -0,0 +1,65 @@
#!/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.
*/

var path = require('path'),
fs = require('fs'),
shjs = require('shelljs'),
zip = require('adm-zip'),
Q = require('q'),
clean = require('./clean'),
check_reqs = require('./check_reqs'),
platformWwwDir = path.join('platforms', 'browser', 'www'),
platformBuildDir = path.join('platforms', 'browser', 'build'),
packageFile = path.join(platformBuildDir, 'package.zip');

/**
* run
* Creates a zip file int platform/build folder
*/
module.exports.run = function(){

return check_reqs.run()
.then(function(){
return clean.cleanProject();
},
function checkReqsError(err){
console.error('Please make sure you meet the software requirements in order to build a browser cordova project');
})
.then(function(){

if (!fs.existsSync(platformBuildDir)) {
fs.mkdirSync(platformBuildDir);
}

// add the project to a zipfile
var zipFile = zip();
zipFile.addLocalFolder(platformWwwDir, '.');
zipFile.writeZip(packageFile);

return Q.resolve();

});
};

module.exports.help = function() {
console.log('Usage: cordova build browser');
console.log('Build will create the packaged app in \''+platformBuildDir+'\'.');
};
28 changes: 28 additions & 0 deletions platforms/browser/cordova/lib/check_reqs.js
@@ -0,0 +1,28 @@
#!/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.
*/

//add methods as we determine what are the requirements

var Q = require('q');

module.exports.run = function() {
return Q.resolve();
};
46 changes: 46 additions & 0 deletions platforms/browser/cordova/lib/clean.js
@@ -0,0 +1,46 @@
#!/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.
*/

var fs = require('fs'),
shjs = require('shelljs'),
path = require('path'),
check_reqs = require('./check_reqs'),
platformBuildDir = path.join('platforms', 'browser', 'build');

exports.cleanProject = function(){

// Check that requirements are (stil) met
if (!check_reqs.run()) {
console.error('Please make sure you meet the software requirements in order to clean an browser cordova project');
process.exit(2);
}

console.log('Cleaning Browser project');
try {
if (fs.existsSync(platformBuildDir)) {
shjs.rm('-r', platformBuildDir);
}
}
catch(err) {
console.log('could not remove '+platformBuildDir+' : '+err.message);
}
};

64 changes: 64 additions & 0 deletions platforms/browser/cordova/node_modules/adm-zip/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 535ba3f

Please sign in to comment.