├── node
├── VERSION
├── .jshintignore
├── framework
├── .gitignore
├── Images
│ ├── appbar.back.rest.png
│ ├── appbar.next.rest.png
│ ├── appbar.save.rest.png
│ ├── appbar.stop.rest.png
│ ├── appbar.close.rest.png
│ └── appbar.feature.video.rest.png
├── resources
│ └── notification-beep.wav
├── Properties
│ └── AssemblyInfo.cs
└── WPCordovaClassLib.sln
├── spec
├── unit
│ ├── fixtures
│ │ └── EmptyProject
│ │ │ └── bin
│ │ │ ├── ARM
│ │ │ ├── Debug
│ │ │ │ └── .gitignore
│ │ │ └── Release
│ │ │ │ └── CordovaAppProj_Release_ARM.xap
│ │ │ └── Debug
│ │ │ └── CordovaAppProj_Debug_AnyCPU.xap
│ ├── package.spec.js
│ ├── run.spec.js
│ └── MSBuildTools.spec.js
├── .jshintrc
└── e2e
│ └── endtoend.spec.js
├── template
├── Background.png
├── __PreviewImage.jpg
├── __TemplateIcon.png
├── www
│ ├── img
│ │ └── logo.png
│ ├── index.html
│ ├── js
│ │ └── index.js
│ └── css
│ │ └── index.css
├── ApplicationIcon.png
├── SplashScreenImage.jpg
├── lib
│ ├── Newtonsoft.Json.dll
│ ├── Newtonsoft.Json.nuspec
│ └── LICENSE.md
├── Images
│ ├── appbar.back.rest.png
│ ├── appbar.close.rest.png
│ ├── appbar.next.rest.png
│ ├── appbar.save.rest.png
│ ├── appbar.stop.rest.png
│ └── appbar.feature.video.rest.png
├── Properties
│ ├── AppManifest.xml
│ ├── AssemblyInfo.cs
│ └── WMAppManifest.xml
├── cordova
│ ├── log.bat
│ ├── defaults.xml
│ ├── lib
│ │ ├── start-emulator.bat
│ │ ├── list-started-emulators.bat
│ │ ├── install-device.bat
│ │ ├── win_os_version.js
│ │ ├── win_sdk_version.js
│ │ ├── install-emulator.bat
│ │ ├── list-devices.bat
│ │ ├── list-emulator-images.bat
│ │ ├── clean.js
│ │ ├── target-list.js
│ │ ├── device.js
│ │ ├── package.js
│ │ ├── MSBuildTools.js
│ │ ├── build.js
│ │ ├── run.js
│ │ └── utils.js
│ ├── build.bat
│ ├── clean
│ ├── run.bat
│ ├── clean.bat
│ ├── win_os_version.bat
│ ├── win_sdk_version.bat
│ ├── version.bat
│ ├── run
│ └── build
├── cordovalib
│ ├── IBrowserDecorator.cs
│ ├── ScriptCallback.cs
│ ├── CordovaView.xaml
│ ├── JSON
│ │ └── JsonHelper.cs
│ ├── CordovaCommandCall.cs
│ ├── PluginResult.cs
│ ├── CommandFactory.cs
│ ├── OrientationHelper.cs
│ ├── ConsoleHelper.cs
│ ├── BrowserMouseHelper.cs
│ ├── MimeTypeMapper.cs
│ ├── Commands
│ │ └── BaseCommand.cs
│ └── ImageExifHelper.cs
├── App.xaml
├── MainPage.xaml.cs
├── MainPage.xaml
├── CordovaWP8Solution.sln
├── App.xaml.cs
└── MyTemplate.vstemplate
├── NOTICE
├── .jshintrc
├── .gitignore
├── LICENSE
├── .github
└── PULL_REQUEST_TEMPLATE.md
├── bin
├── createTemplates.bat
├── update.bat
├── check_reqs.bat
├── create.bat
├── update
├── check_reqs
├── create
└── lib
│ ├── update.js
│ ├── check_reqs.js
│ └── create.js
├── appveyor.yml
├── cordova-js-src
├── platform.js
└── exec.js
├── CONTRIBUTING.md
├── .gitattributes
├── package.json
└── README.md
/node:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/VERSION:
--------------------------------------------------------------------------------
1 | 3.9.0-dev
2 |
--------------------------------------------------------------------------------
/.jshintignore:
--------------------------------------------------------------------------------
1 | template/www/*
2 |
--------------------------------------------------------------------------------
/framework/.gitignore:
--------------------------------------------------------------------------------
1 | /_UpgradeReport_Files/
2 |
--------------------------------------------------------------------------------
/spec/unit/fixtures/EmptyProject/bin/ARM/Debug/.gitignore:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/spec/unit/fixtures/EmptyProject/bin/Debug/CordovaAppProj_Debug_AnyCPU.xap:
--------------------------------------------------------------------------------
1 | (dummy package)
--------------------------------------------------------------------------------
/spec/unit/fixtures/EmptyProject/bin/ARM/Release/CordovaAppProj_Release_ARM.xap:
--------------------------------------------------------------------------------
1 | (dummy package)
--------------------------------------------------------------------------------
/template/Background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/cordova-wp8/HEAD/template/Background.png
--------------------------------------------------------------------------------
/template/__PreviewImage.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/cordova-wp8/HEAD/template/__PreviewImage.jpg
--------------------------------------------------------------------------------
/template/__TemplateIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/cordova-wp8/HEAD/template/__TemplateIcon.png
--------------------------------------------------------------------------------
/template/www/img/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/cordova-wp8/HEAD/template/www/img/logo.png
--------------------------------------------------------------------------------
/template/ApplicationIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/cordova-wp8/HEAD/template/ApplicationIcon.png
--------------------------------------------------------------------------------
/template/SplashScreenImage.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/cordova-wp8/HEAD/template/SplashScreenImage.jpg
--------------------------------------------------------------------------------
/template/lib/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/cordova-wp8/HEAD/template/lib/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/framework/Images/appbar.back.rest.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/cordova-wp8/HEAD/framework/Images/appbar.back.rest.png
--------------------------------------------------------------------------------
/framework/Images/appbar.next.rest.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/cordova-wp8/HEAD/framework/Images/appbar.next.rest.png
--------------------------------------------------------------------------------
/framework/Images/appbar.save.rest.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/cordova-wp8/HEAD/framework/Images/appbar.save.rest.png
--------------------------------------------------------------------------------
/framework/Images/appbar.stop.rest.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/cordova-wp8/HEAD/framework/Images/appbar.stop.rest.png
--------------------------------------------------------------------------------
/template/Images/appbar.back.rest.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/cordova-wp8/HEAD/template/Images/appbar.back.rest.png
--------------------------------------------------------------------------------
/template/Images/appbar.close.rest.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/cordova-wp8/HEAD/template/Images/appbar.close.rest.png
--------------------------------------------------------------------------------
/template/Images/appbar.next.rest.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/cordova-wp8/HEAD/template/Images/appbar.next.rest.png
--------------------------------------------------------------------------------
/template/Images/appbar.save.rest.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/cordova-wp8/HEAD/template/Images/appbar.save.rest.png
--------------------------------------------------------------------------------
/template/Images/appbar.stop.rest.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/cordova-wp8/HEAD/template/Images/appbar.stop.rest.png
--------------------------------------------------------------------------------
/framework/Images/appbar.close.rest.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/cordova-wp8/HEAD/framework/Images/appbar.close.rest.png
--------------------------------------------------------------------------------
/framework/resources/notification-beep.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/cordova-wp8/HEAD/framework/resources/notification-beep.wav
--------------------------------------------------------------------------------
/framework/Images/appbar.feature.video.rest.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/cordova-wp8/HEAD/framework/Images/appbar.feature.video.rest.png
--------------------------------------------------------------------------------
/template/Images/appbar.feature.video.rest.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/cordova-wp8/HEAD/template/Images/appbar.feature.video.rest.png
--------------------------------------------------------------------------------
/NOTICE:
--------------------------------------------------------------------------------
1 | Apache Cordova
2 | Copyright 2012 The Apache Software Foundation
3 |
4 | This product includes software developed by
5 | The Apache Software Foundation (http://www.apache.org)
--------------------------------------------------------------------------------
/.jshintrc:
--------------------------------------------------------------------------------
1 | {
2 | "node": true
3 | , "bitwise": true
4 | , "undef": true
5 | , "trailing": true
6 | , "quotmark": true
7 | , "indent": 4
8 | , "unused": "vars"
9 | , "latedef": "nofunc"
10 | }
11 |
--------------------------------------------------------------------------------
/spec/.jshintrc:
--------------------------------------------------------------------------------
1 | {
2 | "node": true
3 | , "bitwise": true
4 | , "undef": true
5 | , "trailing": true
6 | , "quotmark": true
7 | , "indent": 4
8 | , "unused": "vars"
9 | , "latedef": "nofunc"
10 | , "jasmine": true
11 | }
12 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | obj
3 | *.csproj.user
4 | *.suo
5 | *.cache
6 | Thumbs.db
7 |
8 | /temp/*
9 |
10 | *.dll
11 | !template/lib/*
12 |
13 | # Ignore template zip files
14 | *.zip
15 |
16 | # Other useful stuff
17 | *.bak
18 | *.cache
19 | *.log
20 | *.swp
21 | *.user
22 |
23 | *.DS_Store
24 |
25 | framework/Bin/*
26 |
27 | node_modules/
28 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 |
2 | Licensed under the Apache License, Version 2.0 (the "License");
3 | you may not use this file except in compliance with the License.
4 | You may obtain a copy of the License at
5 |
6 | http://www.apache.org/licenses/LICENSE-2.0
7 |
8 | Unless required by applicable law or agreed to in writing, software
9 | distributed under the License is distributed on an "AS IS" BASIS,
10 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | See the License for the specific language governing permissions and
12 | limitations under the License.
13 |
14 | This product bundles Newtonsoft.Json, which is available under The MIT License (MIT).
15 | For details, see template/lib/LICENSE.md, http://james.newtonking.com/json
16 |
--------------------------------------------------------------------------------
/template/lib/Newtonsoft.Json.nuspec:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Newtonsoft.Json
5 | 6.0.8
6 | Json.NET
7 | James Newton-King
8 | James Newton-King
9 | https://raw.github.com/JamesNK/Newtonsoft.Json/master/LICENSE.md
10 | http://james.newtonking.com/json
11 | false
12 | Json.NET is a popular high-performance JSON framework for .NET
13 | en-US
14 | json
15 |
16 |
--------------------------------------------------------------------------------
/.github/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 |
9 |
10 | ### Platforms affected
11 |
12 |
13 | ### What does this PR do?
14 |
15 |
16 | ### What testing has been done on this change?
17 |
18 |
19 | ### Checklist
20 | - [ ] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA database
21 | - [ ] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform affected.
22 | - [ ] Added automated test coverage as appropriate for this change.
23 |
--------------------------------------------------------------------------------
/template/Properties/AppManifest.xml:
--------------------------------------------------------------------------------
1 |
14 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/bin/createTemplates.bat:
--------------------------------------------------------------------------------
1 | @ECHO OFF
2 | goto endheader
3 | #
4 | # Licensed to the Apache Software Foundation (ASF) under one
5 | # or more contributor license agreements. See the NOTICE file
6 | # distributed with this work for additional information
7 | # regarding copyright ownership. The ASF licenses this file
8 | # to you under the Apache License, Version 2.0 (the
9 | # "License"); you may not use this file except in compliance
10 | # with the License. You may obtain a copy of the License at
11 | #
12 | # http://www.apache.org/licenses/LICENSE-2.0
13 | #
14 | # Unless required by applicable law or agreed to in writing,
15 | # software distributed under the License is distributed on an
16 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 | # KIND, either express or implied. See the License for the
18 | # specific language governing permissions and limitations
19 | # under the License.
20 | #
21 | :endheader
22 |
23 | cscript "%~dp0\createTemplates.js" %* //nologo
--------------------------------------------------------------------------------
/template/cordova/log.bat:
--------------------------------------------------------------------------------
1 | @ECHO OFF
2 | goto endheader
3 | #
4 | # Licensed to the Apache Software Foundation (ASF) under one
5 | # or more contributor license agreements. See the NOTICE file
6 | # distributed with this work for additional information
7 | # regarding copyright ownership. The ASF licenses this file
8 | # to you under the Apache License, Version 2.0 (the
9 | # "License"); you may not use this file except in compliance
10 | # with the License. You may obtain a copy of the License at
11 | #
12 | # http://www.apache.org/licenses/LICENSE-2.0
13 | #
14 | # Unless required by applicable law or agreed to in writing,
15 | # software distributed under the License is distributed on an
16 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 | # KIND, either express or implied. See the License for the
18 | # specific language governing permissions and limitations
19 | # under the License.
20 | #
21 | :endheader
22 |
23 | @ECHO OFF
24 | ECHO Sorry, logging is not supported for Windows Phone. 1>&2
25 | EXIT /B 1
--------------------------------------------------------------------------------
/template/cordova/defaults.xml:
--------------------------------------------------------------------------------
1 |
2 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/template/cordova/lib/start-emulator.bat:
--------------------------------------------------------------------------------
1 | @ECHO OFF
2 | goto endheader
3 | #
4 | # Licensed to the Apache Software Foundation (ASF) under one
5 | # or more contributor license agreements. See the NOTICE file
6 | # distributed with this work for additional information
7 | # regarding copyright ownership. The ASF licenses this file
8 | # to you under the Apache License, Version 2.0 (the
9 | # "License"); you may not use this file except in compliance
10 | # with the License. You may obtain a copy of the License at
11 | #
12 | # http://www.apache.org/licenses/LICENSE-2.0
13 | #
14 | # Unless required by applicable law or agreed to in writing,
15 | # software distributed under the License is distributed on an
16 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 | # KIND, either express or implied. See the License for the
18 | # specific language governing permissions and limitations
19 | # under the License.
20 | #
21 | :endheader
22 |
23 | ECHO Sorry, start-emulator is not availible yet for Windows Phone. 1>&2
24 | EXIT /B 1
--------------------------------------------------------------------------------
/template/cordova/lib/list-started-emulators.bat:
--------------------------------------------------------------------------------
1 | @ECHO OFF
2 | goto endheader
3 | #
4 | # Licensed to the Apache Software Foundation (ASF) under one
5 | # or more contributor license agreements. See the NOTICE file
6 | # distributed with this work for additional information
7 | # regarding copyright ownership. The ASF licenses this file
8 | # to you under the Apache License, Version 2.0 (the
9 | # "License"); you may not use this file except in compliance
10 | # with the License. You may obtain a copy of the License at
11 | #
12 | # http://www.apache.org/licenses/LICENSE-2.0
13 | #
14 | # Unless required by applicable law or agreed to in writing,
15 | # software distributed under the License is distributed on an
16 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 | # KIND, either express or implied. See the License for the
18 | # specific language governing permissions and limitations
19 | # under the License.
20 | #
21 | :endheader
22 |
23 | ECHO Sorry, list-started-emulators is not availible yet for Windows Phone. 1>&2
24 | EXIT /B 1
--------------------------------------------------------------------------------
/appveyor.yml:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one
3 | # or more contributor license agreements. See the NOTICE file
4 | # distributed with this work for additional information
5 | # regarding copyright ownership. The ASF licenses this file
6 | # to you under the Apache License, Version 2.0 (the
7 | # "License"); you may not use this file except in compliance
8 | # with the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing,
13 | # software distributed under the License is distributed on an
14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | # KIND, either express or implied. See the License for the
16 | # specific language governing permissions and limitations
17 | # under the License.
18 | #
19 |
20 | # appveyor file
21 | # http://www.appveyor.com/docs/appveyor-yml
22 |
23 | install:
24 | - npm install
25 |
26 | build: off
27 |
28 | test_script:
29 | - node --version
30 | - npm --version
31 | - msbuild /version
32 | - npm test
--------------------------------------------------------------------------------
/template/cordova/build.bat:
--------------------------------------------------------------------------------
1 | @ECHO OFF
2 | goto endheader
3 | #
4 | # Licensed to the Apache Software Foundation (ASF) under one
5 | # or more contributor license agreements. See the NOTICE file
6 | # distributed with this work for additional information
7 | # regarding copyright ownership. The ASF licenses this file
8 | # to you under the Apache License, Version 2.0 (the
9 | # "License"); you may not use this file except in compliance
10 | # with the License. You may obtain a copy of the License at
11 | #
12 | # http://www.apache.org/licenses/LICENSE-2.0
13 | #
14 | # Unless required by applicable law or agreed to in writing,
15 | # software distributed under the License is distributed on an
16 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 | # KIND, either express or implied. See the License for the
18 | # specific language governing permissions and limitations
19 | # under the License.
20 | #
21 | :endheader
22 |
23 | SET script_path="%~dp0build"
24 | IF EXIST %script_path% (
25 | node %script_path% %*
26 | ) ELSE (
27 | ECHO.
28 | ECHO ERROR: Could not find 'build' in cordova, aborting...>&2
29 | EXIT /B 1
30 | )
--------------------------------------------------------------------------------
/bin/update.bat:
--------------------------------------------------------------------------------
1 | @ECHO OFF
2 | goto endheader
3 | #
4 | # Licensed to the Apache Software Foundation (ASF) under one
5 | # or more contributor license agreements. See the NOTICE file
6 | # distributed with this work for additional information
7 | # regarding copyright ownership. The ASF licenses this file
8 | # to you under the Apache License, Version 2.0 (the
9 | # "License"); you may not use this file except in compliance
10 | # with the License. You may obtain a copy of the License at
11 | #
12 | # http://www.apache.org/licenses/LICENSE-2.0
13 | #
14 | # Unless required by applicable law or agreed to in writing,
15 | # software distributed under the License is distributed on an
16 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 | # KIND, either express or implied. See the License for the
18 | # specific language governing permissions and limitations
19 | # under the License.
20 | #
21 | :endheader
22 |
23 | SET script_path="%~dp0update"
24 | IF EXIST %script_path% (
25 | node %script_path% %*
26 | ) ELSE (
27 | ECHO.
28 | ECHO ERROR: Could not find 'update' script in 'bin' folder, aborting...>&2
29 | EXIT /B 1
30 | )
--------------------------------------------------------------------------------
/template/cordova/clean:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 |
3 | /*
4 | Licensed to the Apache Software Foundation (ASF) under one
5 | or more contributor license agreements. See the NOTICE file
6 | distributed with this work for additional information
7 | regarding copyright ownership. The ASF licenses this file
8 | to you under the Apache License, Version 2.0 (the
9 | "License"); you may not use this file except in compliance
10 | with the License. You may obtain a copy of the License at
11 |
12 | http://www.apache.org/licenses/LICENSE-2.0
13 |
14 | Unless required by applicable law or agreed to in writing,
15 | software distributed under the License is distributed on an
16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 | KIND, either express or implied. See the License for the
18 | specific language governing permissions and limitations
19 | under the License.
20 | */
21 |
22 | var clean = require('./lib/clean');
23 |
24 | clean.run(process.argv).done(null, function(err) {
25 | console.error('ERROR: ' + err);
26 | process.exit(2);
27 | });
--------------------------------------------------------------------------------
/template/cordova/run.bat:
--------------------------------------------------------------------------------
1 | @ECHO OFF
2 | goto endheader
3 | #
4 | # Licensed to the Apache Software Foundation (ASF) under one
5 | # or more contributor license agreements. See the NOTICE file
6 | # distributed with this work for additional information
7 | # regarding copyright ownership. The ASF licenses this file
8 | # to you under the Apache License, Version 2.0 (the
9 | # "License"); you may not use this file except in compliance
10 | # with the License. You may obtain a copy of the License at
11 | #
12 | # http://www.apache.org/licenses/LICENSE-2.0
13 | #
14 | # Unless required by applicable law or agreed to in writing,
15 | # software distributed under the License is distributed on an
16 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 | # KIND, either express or implied. See the License for the
18 | # specific language governing permissions and limitations
19 | # under the License.
20 | #
21 | :endheader
22 |
23 | SET script_path="%~dp0run"
24 | IF EXIST %script_path% (
25 | node %script_path% %*
26 | ) ELSE (
27 | ECHO.
28 | ECHO ERROR: Could not find 'run' in cordova, aborting...>&2
29 | EXIT /B 1
30 | )
31 |
--------------------------------------------------------------------------------
/bin/check_reqs.bat:
--------------------------------------------------------------------------------
1 | @ECHO OFF
2 | goto endheader
3 | #
4 | # Licensed to the Apache Software Foundation (ASF) under one
5 | # or more contributor license agreements. See the NOTICE file
6 | # distributed with this work for additional information
7 | # regarding copyright ownership. The ASF licenses this file
8 | # to you under the Apache License, Version 2.0 (the
9 | # "License"); you may not use this file except in compliance
10 | # with the License. You may obtain a copy of the License at
11 | #
12 | # http://www.apache.org/licenses/LICENSE-2.0
13 | #
14 | # Unless required by applicable law or agreed to in writing,
15 | # software distributed under the License is distributed on an
16 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 | # KIND, either express or implied. See the License for the
18 | # specific language governing permissions and limitations
19 | # under the License.
20 | #
21 | :endheader
22 |
23 | SET script_path="%~dp0check_reqs"
24 | IF EXIST %script_path% (
25 | node %script_path% %*
26 | ) ELSE (
27 | ECHO.
28 | ECHO ERROR: Could not find 'check_reqs' in 'bin' folder, aborting...>&2
29 | EXIT /B 1
30 | )
--------------------------------------------------------------------------------
/bin/create.bat:
--------------------------------------------------------------------------------
1 | @ECHO OFF
2 | goto endheader
3 | #
4 | # Licensed to the Apache Software Foundation (ASF) under one
5 | # or more contributor license agreements. See the NOTICE file
6 | # distributed with this work for additional information
7 | # regarding copyright ownership. The ASF licenses this file
8 | # to you under the Apache License, Version 2.0 (the
9 | # "License"); you may not use this file except in compliance
10 | # with the License. You may obtain a copy of the License at
11 | #
12 | # http://www.apache.org/licenses/LICENSE-2.0
13 | #
14 | # Unless required by applicable law or agreed to in writing,
15 | # software distributed under the License is distributed on an
16 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 | # KIND, either express or implied. See the License for the
18 | # specific language governing permissions and limitations
19 | # under the License.
20 | #
21 | :endheader
22 |
23 | SET full_path=%~dp0
24 | IF EXIST "%full_path%create" (
25 | node "%full_path%create" %*
26 | ) ELSE (
27 | ECHO.
28 | ECHO ERROR: Could not find 'create' in 'bin' folder, aborting...>&2
29 | EXIT /B 1
30 | )
31 |
--------------------------------------------------------------------------------
/template/cordova/clean.bat:
--------------------------------------------------------------------------------
1 | @ECHO OFF
2 | goto endheader
3 | #
4 | # Licensed to the Apache Software Foundation (ASF) under one
5 | # or more contributor license agreements. See the NOTICE file
6 | # distributed with this work for additional information
7 | # regarding copyright ownership. The ASF licenses this file
8 | # to you under the Apache License, Version 2.0 (the
9 | # "License"); you may not use this file except in compliance
10 | # with the License. You may obtain a copy of the License at
11 | #
12 | # http://www.apache.org/licenses/LICENSE-2.0
13 | #
14 | # Unless required by applicable law or agreed to in writing,
15 | # software distributed under the License is distributed on an
16 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 | # KIND, either express or implied. See the License for the
18 | # specific language governing permissions and limitations
19 | # under the License.
20 | #
21 | :endheader
22 |
23 | SET script_path="%~dp0clean"
24 | IF EXIST %script_path% (
25 | node %script_path% %*
26 | ) ELSE (
27 | ECHO.
28 | ECHO ERROR: Could not find 'clean' script in 'cordova' folder, aborting...>&2
29 | EXIT /B 1
30 | )
--------------------------------------------------------------------------------
/template/cordovalib/IBrowserDecorator.cs:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed under the Apache License, Version 2.0 (the "License");
3 | you may not use this file except in compliance with the License.
4 | You may obtain a copy of the License at
5 |
6 | http://www.apache.org/licenses/LICENSE-2.0
7 |
8 | Unless required by applicable law or agreed to in writing, software
9 | distributed under the License is distributed on an "AS IS" BASIS,
10 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | See the License for the specific language governing permissions and
12 | limitations under the License.
13 | */
14 |
15 | using Microsoft.Phone.Controls;
16 | using System;
17 | using System.Collections.Generic;
18 | using System.Linq;
19 | using System.Text;
20 | using System.Threading.Tasks;
21 |
22 | namespace WPCordovaClassLib.CordovaLib
23 | {
24 | interface IBrowserDecorator
25 | {
26 | WebBrowser Browser { get; set; }
27 | void InjectScript();
28 | bool HandleCommand(string cmd);
29 | void AttachNativeHandlers();
30 | void DetachNativeHandlers();
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/template/lib/LICENSE.md:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2007 James Newton-King
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | this software and associated documentation files (the "Software"), to deal in
7 | the Software without restriction, including without limitation the rights to
8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 | the Software, and to permit persons to whom the Software is furnished to do so,
10 | subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/template/cordova/lib/install-device.bat:
--------------------------------------------------------------------------------
1 | @ECHO OFF
2 | goto endheader
3 | #
4 | # Licensed to the Apache Software Foundation (ASF) under one
5 | # or more contributor license agreements. See the NOTICE file
6 | # distributed with this work for additional information
7 | # regarding copyright ownership. The ASF licenses this file
8 | # to you under the Apache License, Version 2.0 (the
9 | # "License"); you may not use this file except in compliance
10 | # with the License. You may obtain a copy of the License at
11 | #
12 | # http://www.apache.org/licenses/LICENSE-2.0
13 | #
14 | # Unless required by applicable law or agreed to in writing,
15 | # software distributed under the License is distributed on an
16 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 | # KIND, either express or implied. See the License for the
18 | # specific language governing permissions and limitations
19 | # under the License.
20 | #
21 | :endheader
22 |
23 | SET script_path="%~dp0\..\run"
24 | IF EXIST %script_path% (
25 | node %script_path% %* --device --nobuild
26 | ) ELSE (
27 | ECHO.
28 | ECHO ERROR: Could not find 'deploy' in cordova, aborting...>&2
29 | EXIT /B 1
30 | )
--------------------------------------------------------------------------------
/template/cordova/lib/win_os_version.js:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | var utils = require('./utils');
21 |
22 | utils.getOSVersion().then(function (version) {
23 | console.log(version);
24 | }, function (err) {
25 | console.error(err);
26 | process.exit(2);
27 | });
28 |
--------------------------------------------------------------------------------
/template/cordova/lib/win_sdk_version.js:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | var utils = require('./utils');
21 |
22 | utils.getSDKVersion().then(function (version) {
23 | console.log(version);
24 | }, function (err) {
25 | console.error(err);
26 | process.exit(2);
27 | });
28 |
--------------------------------------------------------------------------------
/template/cordova/lib/install-emulator.bat:
--------------------------------------------------------------------------------
1 | @ECHO OFF
2 | goto endheader
3 | #
4 | # Licensed to the Apache Software Foundation (ASF) under one
5 | # or more contributor license agreements. See the NOTICE file
6 | # distributed with this work for additional information
7 | # regarding copyright ownership. The ASF licenses this file
8 | # to you under the Apache License, Version 2.0 (the
9 | # "License"); you may not use this file except in compliance
10 | # with the License. You may obtain a copy of the License at
11 | #
12 | # http://www.apache.org/licenses/LICENSE-2.0
13 | #
14 | # Unless required by applicable law or agreed to in writing,
15 | # software distributed under the License is distributed on an
16 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 | # KIND, either express or implied. See the License for the
18 | # specific language governing permissions and limitations
19 | # under the License.
20 | #
21 | :endheader
22 |
23 | SET script_path="%~dp0\..\run"
24 | IF EXIST %script_path% (
25 | node %script_path% %* --emulator --nobuild
26 | ) ELSE (
27 | ECHO.
28 | ECHO ERROR: Could not find 'run' in cordova, aborting...>&2
29 | EXIT /B 1
30 | )
--------------------------------------------------------------------------------
/template/cordova/lib/list-devices.bat:
--------------------------------------------------------------------------------
1 | @ECHO OFF
2 | goto endheader
3 | #
4 | # Licensed to the Apache Software Foundation (ASF) under one
5 | # or more contributor license agreements. See the NOTICE file
6 | # distributed with this work for additional information
7 | # regarding copyright ownership. The ASF licenses this file
8 | # to you under the Apache License, Version 2.0 (the
9 | # "License"); you may not use this file except in compliance
10 | # with the License. You may obtain a copy of the License at
11 | #
12 | # http://www.apache.org/licenses/LICENSE-2.0
13 | #
14 | # Unless required by applicable law or agreed to in writing,
15 | # software distributed under the License is distributed on an
16 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 | # KIND, either express or implied. See the License for the
18 | # specific language governing permissions and limitations
19 | # under the License.
20 | #
21 | :endheader
22 |
23 | SET script_path="%~dp0target-list.js"
24 | IF EXIST %script_path% (
25 | node %script_path% %* --devices
26 | ) ELSE (
27 | ECHO.
28 | ECHO ERROR: Could not find 'target-list.js' in cordova/lib, aborting...>&2
29 | EXIT /B 1
30 | )
--------------------------------------------------------------------------------
/template/cordova/win_os_version.bat:
--------------------------------------------------------------------------------
1 | @ECHO OFF
2 | goto endheader
3 | #
4 | # Licensed to the Apache Software Foundation (ASF) under one
5 | # or more contributor license agreements. See the NOTICE file
6 | # distributed with this work for additional information
7 | # regarding copyright ownership. The ASF licenses this file
8 | # to you under the Apache License, Version 2.0 (the
9 | # "License"); you may not use this file except in compliance
10 | # with the License. You may obtain a copy of the License at
11 | #
12 | # http://www.apache.org/licenses/LICENSE-2.0
13 | #
14 | # Unless required by applicable law or agreed to in writing,
15 | # software distributed under the License is distributed on an
16 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 | # KIND, either express or implied. See the License for the
18 | # specific language governing permissions and limitations
19 | # under the License.
20 | #
21 | :endheader
22 |
23 | SET script_path="%~dp0lib\win_os_version.js"
24 | IF EXIST %script_path% (
25 | node %script_path% %*
26 | ) ELSE (
27 | ECHO.
28 | ECHO ERROR: Could not find 'win_os_version.js' in 'bin' folder, aborting...>&2
29 | EXIT /B 1
30 | )
--------------------------------------------------------------------------------
/template/cordova/win_sdk_version.bat:
--------------------------------------------------------------------------------
1 | @ECHO OFF
2 | goto endheader
3 | #
4 | # Licensed to the Apache Software Foundation (ASF) under one
5 | # or more contributor license agreements. See the NOTICE file
6 | # distributed with this work for additional information
7 | # regarding copyright ownership. The ASF licenses this file
8 | # to you under the Apache License, Version 2.0 (the
9 | # "License"); you may not use this file except in compliance
10 | # with the License. You may obtain a copy of the License at
11 | #
12 | # http://www.apache.org/licenses/LICENSE-2.0
13 | #
14 | # Unless required by applicable law or agreed to in writing,
15 | # software distributed under the License is distributed on an
16 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 | # KIND, either express or implied. See the License for the
18 | # specific language governing permissions and limitations
19 | # under the License.
20 | #
21 | :endheader
22 |
23 | SET script_path="%~dp0lib\win_sdk_version.js"
24 | IF EXIST %script_path% (
25 | node %script_path% %*
26 | ) ELSE (
27 | ECHO.
28 | ECHO ERROR: Could not find 'win_sdk_version.js' in 'bin' folder, aborting...>&2
29 | EXIT /B 1
30 | )
--------------------------------------------------------------------------------
/template/cordova/version.bat:
--------------------------------------------------------------------------------
1 | @ECHO OFF
2 | goto endheader
3 | #
4 | # Licensed to the Apache Software Foundation (ASF) under one
5 | # or more contributor license agreements. See the NOTICE file
6 | # distributed with this work for additional information
7 | # regarding copyright ownership. The ASF licenses this file
8 | # to you under the Apache License, Version 2.0 (the
9 | # "License"); you may not use this file except in compliance
10 | # with the License. You may obtain a copy of the License at
11 | #
12 | # http://www.apache.org/licenses/LICENSE-2.0
13 | #
14 | # Unless required by applicable law or agreed to in writing,
15 | # software distributed under the License is distributed on an
16 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 | # KIND, either express or implied. See the License for the
18 | # specific language governing permissions and limitations
19 | # under the License.
20 | #
21 | :endheader
22 |
23 | @ECHO OFF
24 | SET script_path="%~dp0..\VERSION"
25 | IF EXIST %script_path% (
26 | type %script_path%
27 | ) ELSE (
28 | ECHO.
29 | ECHO ERROR: Could not find file VERSION in project folder, path tried was %script_path% >&2
30 | EXIT /B 1
31 | )
--------------------------------------------------------------------------------
/template/cordova/lib/list-emulator-images.bat:
--------------------------------------------------------------------------------
1 | @ECHO OFF
2 | goto endheader
3 | #
4 | # Licensed to the Apache Software Foundation (ASF) under one
5 | # or more contributor license agreements. See the NOTICE file
6 | # distributed with this work for additional information
7 | # regarding copyright ownership. The ASF licenses this file
8 | # to you under the Apache License, Version 2.0 (the
9 | # "License"); you may not use this file except in compliance
10 | # with the License. You may obtain a copy of the License at
11 | #
12 | # http://www.apache.org/licenses/LICENSE-2.0
13 | #
14 | # Unless required by applicable law or agreed to in writing,
15 | # software distributed under the License is distributed on an
16 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 | # KIND, either express or implied. See the License for the
18 | # specific language governing permissions and limitations
19 | # under the License.
20 | #
21 | :endheader
22 |
23 | SET script_path="%~dp0target-list.js"
24 | IF EXIST %script_path% (
25 | node %script_path% %* --emulators
26 | ) ELSE (
27 | ECHO.
28 | ECHO ERROR: Could not find 'target-list.js' in cordova/lib, aborting...>&2
29 | EXIT /B 1
30 | )
--------------------------------------------------------------------------------
/template/cordova/lib/clean.js:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | var Q = require('q'),
21 | path = require('path'),
22 | shell = require('shelljs');
23 |
24 | var ROOT = path.join(__dirname, '..', '..');
25 |
26 | module.exports.run = function (argv) {
27 | var projectPath = ROOT;
28 | ['obj', 'Bin'].forEach(function(dir) {
29 | shell.rm('-rf', path.join(projectPath, dir));
30 | });
31 | return Q.resolve();
32 | };
--------------------------------------------------------------------------------
/template/cordova/run:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 |
3 | /*
4 | Licensed to the Apache Software Foundation (ASF) under one
5 | or more contributor license agreements. See the NOTICE file
6 | distributed with this work for additional information
7 | regarding copyright ownership. The ASF licenses this file
8 | to you under the Apache License, Version 2.0 (the
9 | "License"); you may not use this file except in compliance
10 | with the License. You may obtain a copy of the License at
11 |
12 | http://www.apache.org/licenses/LICENSE-2.0
13 |
14 | Unless required by applicable law or agreed to in writing,
15 | software distributed under the License is distributed on an
16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 | KIND, either express or implied. See the License for the
18 | specific language governing permissions and limitations
19 | under the License.
20 | */
21 |
22 | var args = process.argv,
23 | run = require('./lib/run');
24 |
25 | // Handle help flag
26 | if (['--help', '/?', '-h', 'help', '-help', '/help'].indexOf(args[2]) > -1) {
27 | run.help();
28 | } else {
29 | run.run(args).done(null, function (err) {
30 | var errorMessage = (err && err.stack) ? err.stack : err;
31 | console.error('ERROR: ' + errorMessage);
32 | process.exit(2);
33 | });
34 | }
--------------------------------------------------------------------------------
/template/cordova/build:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 |
3 | /*
4 | Licensed to the Apache Software Foundation (ASF) under one
5 | or more contributor license agreements. See the NOTICE file
6 | distributed with this work for additional information
7 | regarding copyright ownership. The ASF licenses this file
8 | to you under the Apache License, Version 2.0 (the
9 | "License"); you may not use this file except in compliance
10 | with the License. You may obtain a copy of the License at
11 |
12 | http://www.apache.org/licenses/LICENSE-2.0
13 |
14 | Unless required by applicable law or agreed to in writing,
15 | software distributed under the License is distributed on an
16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 | KIND, either express or implied. See the License for the
18 | specific language governing permissions and limitations
19 | under the License.
20 | */
21 |
22 | var build = require('./lib/build'),
23 | args = process.argv;
24 |
25 | // Handle help flag
26 | if (['--help', '/?', '-h', 'help', '-help', '/help'].indexOf(args[2]) > -1) {
27 | build.help();
28 | } else {
29 | build.run(args).done(null, function(err) {
30 | var errorMessage = (err && err.stack) ? err.stack : err;
31 | console.error('ERROR: ' + errorMessage);
32 | process.exit(2);
33 | });
34 | }
--------------------------------------------------------------------------------
/bin/update:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 |
3 | /*
4 | Licensed to the Apache Software Foundation (ASF) under one
5 | or more contributor license agreements. See the NOTICE file
6 | distributed with this work for additional information
7 | regarding copyright ownership. The ASF licenses this file
8 | to you under the Apache License, Version 2.0 (the
9 | "License"); you may not use this file except in compliance
10 | with the License. You may obtain a copy of the License at
11 |
12 | http://www.apache.org/licenses/LICENSE-2.0
13 |
14 | Unless required by applicable law or agreed to in writing,
15 | software distributed under the License is distributed on an
16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 | KIND, either express or implied. See the License for the
18 | specific language governing permissions and limitations
19 | under the License.
20 | */
21 |
22 | var update = require('./lib/update');
23 |
24 | // check for help flag
25 | if (['--help', '/?', '-h', 'help', '-help', '/help'].indexOf(process.argv[2]) > -1) {
26 | update.help();
27 | } else {
28 | update.run(process.argv).done(function () {
29 | console.log('Successfully updated windows project.');
30 | }, function (err) {
31 | console.error('Failed to check requirements due to', err);
32 | process.exit(2);
33 | });
34 | }
35 |
--------------------------------------------------------------------------------
/bin/check_reqs:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 |
3 | /*
4 | Licensed to the Apache Software Foundation (ASF) under one
5 | or more contributor license agreements. See the NOTICE file
6 | distributed with this work for additional information
7 | regarding copyright ownership. The ASF licenses this file
8 | to you under the Apache License, Version 2.0 (the
9 | "License"); you may not use this file except in compliance
10 | with the License. You may obtain a copy of the License at
11 |
12 | http://www.apache.org/licenses/LICENSE-2.0
13 |
14 | Unless required by applicable law or agreed to in writing,
15 | software distributed under the License is distributed on an
16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 | KIND, either express or implied. See the License for the
18 | specific language governing permissions and limitations
19 | under the License.
20 | */
21 |
22 | var check_reqs = require('./lib/check_reqs');
23 |
24 | // check for help flag
25 | if (['--help', '/?', '-h', 'help', '-help', '/help'].indexOf(process.argv[2]) > -1) {
26 | check_reqs.help();
27 | } else {
28 | check_reqs.run().done(function success(msbuild) {
29 | console.log('Environment is supported; found MSBuild Tools version ' + msbuild.version + ' at ' + msbuild.path);
30 | }, function (err) {
31 | console.error('Failed to check requirements due to', err);
32 | process.exit(2);
33 | });
34 | }
--------------------------------------------------------------------------------
/bin/create:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 |
3 | /*
4 | Licensed to the Apache Software Foundation (ASF) under one
5 | or more contributor license agreements. See the NOTICE file
6 | distributed with this work for additional information
7 | regarding copyright ownership. The ASF licenses this file
8 | to you under the Apache License, Version 2.0 (the
9 | "License"); you may not use this file except in compliance
10 | with the License. You may obtain a copy of the License at
11 |
12 | http://www.apache.org/licenses/LICENSE-2.0
13 |
14 | Unless required by applicable law or agreed to in writing,
15 | software distributed under the License is distributed on an
16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 | KIND, either express or implied. See the License for the
18 | specific language governing permissions and limitations
19 | under the License.
20 | */
21 |
22 | /*
23 | * create a cordova/windows8 project
24 | * USAGE
25 | * ./create [path package activity]
26 | * ./bin/create.bat C:\Users\Me\MyTestProj "test.proj" "TestProject"
27 | */
28 |
29 | var create = require('./lib/create');
30 |
31 | if (['--help', '/?', '-h', 'help', '-help', '/help'].indexOf(process.argv[2]) > -1) {
32 | create.help();
33 | } else {
34 | create.run(process.argv).done(null, function (err) {
35 | console.error('Failed to create project due to', err);
36 | process.exit(2);
37 | });
38 | }
39 |
--------------------------------------------------------------------------------
/cordova-js-src/platform.js:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | *
20 | */
21 |
22 | module.exports = {
23 | id: 'windowsphone',
24 | bootstrap: function() {
25 | var cordova = require('cordova'),
26 | exec = require('cordova/exec');
27 |
28 | // Inject a listener for the backbutton, and tell native to override the flag (true/false) when we have 1 or more, or 0, listeners
29 | var backButtonChannel = cordova.addDocumentEventHandler('backbutton');
30 | backButtonChannel.onHasSubscribersChange = function() {
31 | exec(null, null, "CoreEvents", "overridebackbutton", [this.numHandlers == 1]);
32 | };
33 | }
34 | };
35 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 |
21 |
22 | # Contributing to Apache Cordova
23 |
24 | Anyone can contribute to Cordova. And we need your contributions.
25 |
26 | There are multiple ways to contribute: report bugs, improve the docs, and
27 | contribute code.
28 |
29 | For instructions on this, start with the
30 | [contribution overview](http://cordova.apache.org/contribute/).
31 |
32 | The details are explained there, but the important items are:
33 | - Sign and submit an Apache ICLA (Contributor License Agreement).
34 | - Have a Jira issue open that corresponds to your contribution.
35 | - Run the tests so your patch doesn't break existing functionality.
36 |
37 | We look forward to your contributions!
38 |
39 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | * text eol=lf
2 |
3 | # source code
4 | *.php text
5 | *.css text
6 | *.sass text
7 | *.scss text
8 | *.less text
9 | *.styl text
10 | *.js text
11 | *.coffee text
12 | *.json text
13 | *.htm text
14 | *.html text
15 | *.xml text
16 | *.svg text
17 | *.txt text
18 | *.ini text
19 | *.inc text
20 | *.pl text
21 | *.rb text
22 | *.py text
23 | *.scm text
24 | *.sql text
25 | *.sh text
26 | *.bat text
27 |
28 | # templates
29 | *.ejs text
30 | *.hbt text
31 | *.jade text
32 | *.haml text
33 | *.hbs text
34 | *.dot text
35 | *.tmpl text
36 | *.phtml text
37 |
38 | # server config
39 | .htaccess text
40 |
41 | # git config
42 | .gitattributes text
43 | .gitignore text
44 | .gitconfig text
45 |
46 | # code analysis config
47 | .jshintrc text
48 | .jscsrc text
49 | .jshintignore text
50 | .csslintrc text
51 |
52 | # misc config
53 | *.yaml text
54 | *.yml text
55 | .editorconfig text
56 |
57 | # build config
58 | *.npmignore text
59 | *.bowerrc text
60 |
61 | # Heroku
62 | Procfile text
63 | .slugignore text
64 |
65 | # Documentation
66 | *.md text
67 | LICENSE text
68 | AUTHORS text
69 |
70 |
71 | #
72 | ## These files are binary and should be left untouched
73 | #
74 |
75 | # (binary is a macro for -text -diff)
76 | *.png binary
77 | *.jpg binary
78 | *.jpeg binary
79 | *.gif binary
80 | *.ico binary
81 | *.mov binary
82 | *.mp4 binary
83 | *.mp3 binary
84 | *.flv binary
85 | *.fla binary
86 | *.swf binary
87 | *.gz binary
88 | *.zip binary
89 | *.7z binary
90 | *.ttf binary
91 | *.eot binary
92 | *.woff binary
93 | *.pyc binary
94 | *.pdf binary
95 | *.dll binary
96 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "cordova-wp8",
3 | "version": "3.9.0-dev",
4 | "description": "cordova-wp8 release",
5 | "main": "bin/create",
6 | "repository": {
7 | "type": "git",
8 | "url": "https://github.com/apache/cordova-wp8"
9 | },
10 | "keywords": [
11 | "wp8",
12 | "windowsphone",
13 | "cordova",
14 | "apache"
15 | ],
16 | "dependencies": {
17 | "nopt": "~3",
18 | "shelljs": "~0.3",
19 | "node-uuid": "~1.4",
20 | "q": "~1"
21 | },
22 | "bundledDependencies": [
23 | "nopt",
24 | "shelljs",
25 | "node-uuid",
26 | "q"
27 | ],
28 | "devDependencies": {
29 | "jasmine-node": "~1",
30 | "jshint": "^2.6.0",
31 | "rewire": ">=2.1.3",
32 | "istanbul": "^0.3.4"
33 | },
34 | "scripts": {
35 | "test": "npm run jshint && npm run test-unit && npm run test-e2e",
36 | "test-unit": "node node_modules/jasmine-node/lib/jasmine-node/cli.js --captureExceptions spec/unit",
37 | "test-e2e": "node node_modules/jasmine-node/lib/jasmine-node/cli.js --captureExceptions spec/e2e",
38 | "cover": "node node_modules/istanbul/lib/cli.js cover --root template --print detail node_modules/jasmine-node/bin/jasmine-node -- spec/unit",
39 | "jshint": "node node_modules/jshint/bin/jshint bin && node node_modules/jshint/bin/jshint template && node node_modules/jshint/bin/jshint spec"
40 | },
41 | "author": "Apache Software Foundation",
42 | "license": "Apache Version 2.0"
43 | }
44 |
--------------------------------------------------------------------------------
/template/App.xaml:
--------------------------------------------------------------------------------
1 |
19 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/template/MainPage.xaml.cs:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | using System;
21 | using System.Collections.Generic;
22 | using System.Linq;
23 | using System.Net;
24 | using System.Windows;
25 | using System.Windows.Controls;
26 | using System.Windows.Documents;
27 | using System.Windows.Input;
28 | using System.Windows.Media;
29 | using System.Windows.Media.Animation;
30 | using System.Windows.Shapes;
31 | using Microsoft.Phone.Controls;
32 | using System.IO;
33 | using System.Windows.Media.Imaging;
34 | using System.Windows.Resources;
35 |
36 |
37 | namespace $safeprojectname$
38 | {
39 | public partial class MainPage : PhoneApplicationPage
40 | {
41 | // Constructor
42 | public MainPage()
43 | {
44 | InitializeComponent();
45 | this.CordovaView.Loaded += CordovaView_Loaded;
46 | }
47 |
48 | private void CordovaView_Loaded(object sender, RoutedEventArgs e)
49 | {
50 | this.CordovaView.Loaded -= CordovaView_Loaded;
51 | }
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/template/www/index.html:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 |