Git Product home page Git Product logo

pwabuilder-cli's Introduction

DEPRECATION NOTICE

This CLI for PWABuilder is no longer maintained. Please use PWABuilder.com instead. If you need to open an issue for PWABuilder-related things, please do so at https://github.com/pwa-builder/PWABuilder/issues

PWA Builder CLI

This tool is used to create hosted web applications based on a W3C Web App manifest.

Installation

npm install -g pwabuilder

Documentation

To get started, visit our wiki.

Command Line Interface

Usage

pwabuilder <website-url> [options]

-or-

pwabuilder <command> [options]

Options

      Option       Description
website-url URL of the hosted website. This parameter is not required if a manifest location is specified with the -m option
-d, --directory (optional) Path to the generated project files (default value: current directory)
-s, --shortname (optional) Application short name. When specified, it overrides the short_name value of the manifest
-l, --loglevel (optional) Tracing log level options. Available log levels: debug,info,warn,error (default value: warn)
-p, --platforms (optional) Platforms to generate. Supported platforms: windows,windows10,android,ios,web (default value: all platforms)
-m, --manifest (optional) Location of the W3C Web App manifest file (URL or local path). If not specified, the tool looks for a manifest in the site URL. Otherwise, a new manifest will be created pointing to the site URL.
-i, --image (optional) Local path to the image file used to generate missing icons in the manifest
-f, --forceManifestFormat (optional) Allows to specify the manifest format and skip the automatic detection. Can be used when the manifest contains additional, non-standard members.
-c, --crosswalk (optional) Enable Crosswalk for Android. Crosswalk is a web runtime that can be used to replace the stock WebView used by Android Cordova apps. Crosswalk is based on Google Chromium with Cordova API support and has better HTML5 feature support compared to the default WebView available in Android.
-w, --webAppToolkit (optional) Adds the Web App Toolkit cordova plugin. The Web App Toolkit is a plugin for creating Windows, Android and iOS apps based on existing web content. It depends on the Hosted Web App Plugin. Used in the right way, it can facilitate the creation of compelling extensions to your web content for users across platforms.
-S, --Sign (deprecated --optional - for package command) Return a signed package for Windows 10.
-W, --DotWeb (deprecated --optional - for package command) Generate a .web package for Windows 10.
-a, --AutoPublish (deprecated --optional - for package command) Auto-publish a package for Windows 10.

Commands

            Command           Description
package [directory] [options] Creates a package for supported platforms (windows10, android, iOS) for uploading to the Store. In some cases, like Windows 10, data must be pulled from the store and updated in the manifest before it can be uploaded. directory is the root path where to look for the target platforms (defaults to the current location). options: -l | --loglevel, -p | --platforms, -S | --Sign, -W | --DotWeb, -a | --AutoPublish
platform add <platform-id> <source> [options] Adds a new platform. platform-id is the platform to be added. source could be either npm package, a GitHub reporitory or a local path to the platform source code. options: -l | --loglevel
platform remove <platform-id> [options] Removes an existing platform. platform-id is the platform to be removed. options: -l | --loglevel
platform list [options] List the existing platforms. options: -l | --loglevel
run <platform> [directory] [options] Launches the app of the specified platform. Currently, android, ios, windows and windows10 platforms are supported by this command. directory is the root path where to look for the target platforms (defaults to the current location). options: -l | --loglevel
open <platform> [directory] [options] (for Windows only) Opens the project file of the generated Windows 8.1 / Windows 10 app in Visual Studio. directory is the root path where to look for the target platforms (defaults to the current location). options: -l | --loglevel

Example

Creating a new hosted web application

pwabuilder http://shiftr.azurewebsites.net -d C:\Projects -l info -p windows10,android

Packaging a Windows 10 app for submission to the Store

pwabuilder package -p windows10 -l debug

Client Library

Manifest Module

var manifestTools = require('manifestTools');

getManifestFromSite(siteUrl, callback)

Retrieves a manifest from a website. It looks for a manifest meta tag in the HTML content of the specified website URL; if no manifest is found, a new W3C manifest is retrieved with default start_name and short_name values.

siteUrl is the URL of the website that hosts the manifest.

callback(err, manifestInfo) returns an error or the manifest object in manifestInfo.

getManifestFromFile(filePath, callback)

Retrieves a manifest from a local path.

siteUrl is the path there the manifest file is located.

callback(err, manifestInfo) returns an error or the manifest object in manifestInfo.

writeToFile(manifestInfo, filePath, callback)

Writes manifest info to the specified path. manifestInfo Manifest data in JSON format.

filePath The path to write to.

callback(err, validationResults) returns an error or an array of validation results.

fetchManifestUrlFromSite(siteUrl, callback)

If found, gets the manifest URL from the specified website URL.

siteUrl is the URL of the website.

callback(err, content) returns an error or a content object with start_url and short_name members.

downloadManifestFromUrl(manifestUrl, callback)

Downloads the manifest from the specified URL.

manifestUrl is the URL of the manifest.

callback(err, manifestInfo) returns an error or the manifest object in manifestInfo.

validateAndNormalizeStartUrl(siteUrl, manifestInfo, callback)

Validates the format of the manifest is a W3C manifest format.

siteUrl is the URL of the website.

manifestInfo is the manifest's data in JSON format.

callback returns an error or the manifest object in manifestInfo.

convertTo(manifestInfo, outputFormat, callback)

Converts the manifest data to the specified output format.

manifestInfo is the manifest's data in JSON format.

outputformat is the format to which the manifest will be converted.

callback(err, manifestInfo) returns an error or the manifest object in manifestInfo.

validateManifest(manifestInfo, targetPlatforms, callback)

Makes sure the manifest is valid for the specified target platforms.

manifestInfo is the manifest's data in JSON format.

targetPlatforms are the platforms to validate against.

callback(err, validationResults) returns an error or an array of validation results.

manifestInfo format

manifestInfo.content stores the manifest content.

manifestInfo.format specifies the type of manifest (possible values: W3C, undefined).


Builder Module

var projectBuilder = require('projectBuilder');

createApps(w3cManifestInfo, rootDir, platforms, options, callback)

Generates the applications for the specified platforms.

w3cManifestInfo is the manifest's data in JSON format.

rootDir is the root directory where the apps will be generated.

platforms a string array specifying one or more target platforms: windows10,windows,android,ios,web.

options an object with one or more properties that customize the generated application:

callback(err) returns an error, if any.


Project Tools module

var projectTools = require('projectTools');

runApp(platform, callback)

Execute the app for the chosen platform.

platform The app will execute for the selected platform.

callback returns an error, if any.

openVisualStudio(callback)

Opens the Visual Studio project.

callback returns an error, if any.


Unit Tests

In the terminal, install the Grunt task runner:

npm install -g grunt-cli

In order to run tests and jshint, execute the following command:

grunt

Supported Input Manifests

We plan to support the following manifest files in the future:

Navigation Scope

The W3C manifest defines a scope that restricts the URLs to which the application can navigate. PWA Builder supports the scope setting for the Android, iOS and Windows platforms (more details here).

Changelog

Releases are documented in GitHub.

Known Issues

  • Creating the directory shortcuts to the Cordova platform-specific projects may fail when running in the Windows environment. The tool reports _"WARNING: Failed to create shortcut for Cordova platform: XXXX."__ where XXXX is ios, windows, or android. This is caused by an issue in Node.js which has been fixed in more recent releases. To resolve this issue, upgrade Node.js to the latest version.

  • Adding the windows platform in the Linux and Mac OS environments fails. The tool reports "WARNING: Failed to add the Cordova platforms: XXXX." where XXXX includes windows. This is caused by an issue in the Windows platform for Cordova. Depending on the cordova-windows version, running the tool can show one of two errors: "Cannot find module 'Q'." or "No such file or directory.". Until this problem is fixed by Cordova, we've removed the windows platform from the default list when creating the app in Linux or Mac OS.

  • Error when building an iOS application for projects generated in a Windows machine and then copied to an OS X machine. Xcode reports "Shell Script Invocation Error - Command /bin/sh failed with exit code 126". This happens when the execution permission (+x) is lost on some scripts when copying between the different file systems.

    To resolve this, open a Terminal window in OS X and execute the following command to restore the executable bit on the script.

    chmod +x [path to the PWA Builder project]/cordova/platforms/ios/cordova/lib/copy-www-build-step.sh
    
  • Issues in Visual Studio 2015 RC with the Windows solution generated by Cordova:

    • Opening the CordovaApp.sln solution file might hang Visual Studio while loading the Windows 8 project. As a workaround, remove the Windows 8 project file from the solution.
    • When building the solution, Visual Studio reports the following error in the Windows 10 project: "'ValidateAppxManifest' failed. Unspecified error". As a workaround, clean and rebuild the solution.

License

PWA Builder

Copyright (c) Microsoft Corporation

All rights reserved.

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ""Software""), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

pwabuilder-cli's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pwabuilder-cli's Issues

Consider renaming the still undocumented mjs_urlAccess

As most names in the W3C Manifest spec are lower case what about using something like:

"mjs_access_whitelist"

For me it is also not clear what _urlAccess stood for... like it wasn't clear that it was a whitelisting of URLs who could access extended APIs.

Generator Not Working?

There are some comments in Hacker News that people have tried the generator from manifoldjs.com and reporting that it isn't working.

I just did a quick test and it didn't come back. Might want to check into this.

Grunt task fails with a fatal error - Mocha exploded!

Executing grunt currently produces the following error:

Running "mochaTest:test" (mochaTest) task
C:\Projects\meteorite\ManifoldJS\lib\common\utils.js:2
if (typeof _$jscoverage['C:\Projects\meteorite\ManifoldJS\lib\common\utils.js'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Mocha exploded!
Error: BLANKET-Error parsing instrumented code: SyntaxError: Unexpected token ILLEGAL
at C:\Projects\meteorite\ManifoldJS\node_modules\blanket\src\index.js:174:35
at Object.blanket._blanket.instrument (C:\Projects\meteorite\ManifoldJS\node_modules\blanket\src\blanket.js:125:17)
at Object.require.extensions..js (C:\Projects\meteorite\ManifoldJS\node_modules\blanket\src\index.js:155:25)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (C:\Projects\meteorite\ManifoldJS\test\common\utils.js:3:13)
at Module._compile (module.js:456:26)
at Module._extensions..js (module.js:474:10)
at Object.require.extensions..js (C:\Projects\meteorite\ManifoldJS\node_modules\blanket\src\index.js:179:17)
Warning: Task "mochaTest:test" failed. Use --force to continue.
Aborted due to warnings.

createApps failed to add Windows Platform

Is there a prerequisite that I could be missing causing this too fail?

WARNING: Failed to add windows platform.
WARNING: One or more tasks failed while generating the Cordova application.
POST /manifests/89a4eb57-ed04-47b6-86b2-2a023d67abaa/build 500 3786.862 ms - 1032
Error: One or more errors occurred when generating the application.
    at /Users/ryanbillingsley/Dev/manifold-api/node_modules/manifoldjs/lib/projectBuilder.js:55:21
    at Array.forEach (native)
    at /Users/ryanbillingsley/Dev/manifold-api/node_modules/manifoldjs/lib/projectBuilder.js:51:17
    at _fulfilled (/Users/ryanbillingsley/Dev/manifold-api/node_modules/manifoldjs/node_modules/q/q.js:794:54)
    at self.promiseDispatch.done (/Users/ryanbillingsley/Dev/manifold-api/node_modules/manifoldjs/node_modules/q/q.js:823:30)
    at Promise.promise.promiseDispatch (/Users/ryanbillingsley/Dev/manifold-api/node_modules/manifoldjs/node_modules/q/q.js:756:13)
    at /Users/ryanbillingsley/Dev/manifold-api/node_modules/manifoldjs/node_modules/q/q.js:564:44
    at flush (/Users/ryanbillingsley/Dev/manifold-api/node_modules/manifoldjs/node_modules/q/q.js:110:17)
    at process._tickCallback (node.js:355:11)

Failing to build on Azure

ERROR: Failed to add the Hosted Web App plugin to the Cordova project.

Seeing this when attempting to the build the projects on Azure.

Full stack trace:

ERROR: Failed to add the Hosted Web App plugin to the Cordova project.
WARNING: The Cordova project could not be created successfully.
POST /manifests/9cc50462-8c52-4406-a50a-6a226352cfad/build 500 16058.088 ms - 22
Error: One or more errors occurred when generating the application.
    at D:\home\site\wwwroot\node_modules\manifoldjs\lib\projectBuilder.js:55:21
    at Array.forEach (native)
    at D:\home\site\wwwroot\node_modules\manifoldjs\lib\projectBuilder.js:51:17
    at _fulfilled (D:\home\site\wwwroot\node_modules\q\q.js:794:54)
    at self.promiseDispatch.done (D:\home\site\wwwroot\node_modules\q\q.js:823:30)
    at Promise.promise.promiseDispatch (D:\home\site\wwwroot\node_modules\q\q.js:756:13)
    at D:\home\site\wwwroot\node_modules\q\q.js:564:44
    at flush (D:\home\site\wwwroot\node_modules\q\q.js:110:17)
    at process._tickCallback (node.js:419:13)

Does manifold.js require the project utilize Cordova?

So, I'm looking to avoid Cordova/Webview-based solutions from a future 'universal app' build process. Does manifold.js require Cordova on projects? Or is it like NativeScript?

Also, do you have Gitter room for casual questions like mine?

dependency warnings with Node 0.12

When I install this, I see:

➜  dir ✗ npm install -g manifoldjs/manifoldjs
npm WARN engine [email protected]: wanted: {"node":">=0.6","npm":"1"} (current: {"node":"0.12.0","npm":"2.5.1"})
npm WARN engine [email protected]: wanted: {"node":"~0.10.x"} (current: {"node":"0.12.0","npm":"2.5.1"})
npm WARN engine [email protected]: wanted: {"node":"0.8.x || 0.10.x"} (current: {"node":"0.12.0","npm":"2.5.1"})
/Users/Nicholas/.nvm/versions/node/v0.12.0/bin/manifoldjs -> /Users/Nicholas/.nvm/versions/node/v0.12.0/lib/node_modules/manifoldjs/manifoldjs.js
[email protected] /Users/Nicholas/.nvm/versions/node/v0.12.0/lib/node_modules/manifoldjs
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected])

We should see if these are issues to be filed upstream, or if we need to update our dependencies.

ERROR: Failed to copy the manifest to the app folder.

Hi There, am i missing something here from the Example ?

manifoldjs http://meteorite.azurewebsites.net -d native  -p ios -b
05/01/15 @ 3:35PM - pulkit.kathuria@Mac Pro ~/Downloads/temp sudo rm -rf native;sudo manifoldjs http://meteorite.azurewebsites.net -d native  -p ios -b
Validation warning (ios): An app icon of the following sizes is required: 76x76, 120x120, 152x152 and 180x180
Validation warning (ios): An 1024x1024 app icon for the App Store is required
Validation warning (ios): A launch image of the following sizes is required: 750x1334, 1334x750, 1242x2208, 2208x1242, 640x1136, 640x960, 1536x2048, 2048x1536, 768x1024 and 1024x768
ERROR: Failed to copy the manifest to the app folder.
WARNING: The Cordova project could not be created successfully.
WARNING: One or more errors occurred when generating the application.

permission (threw in 777)

05/01/15 @ 3:39PM - pulkit.kathuria@Mac Pro ~/Downloads ls -la
..
...
drwxrwxrwx   3 pulkit.kathuria  XXX\Domain Users   102 May  1 15:40 temp

Update tool to support Cordova v5.0.0

There are some breaking changes in the tool when updating the cordova dependency version to v5.0.0 that causes the building process of the cordova apps to fail.

Support Android Studio out of the box

In order to support Android Studio out of the box, you need to add the CordobaLibs project into the sourceSets section of the build.gradle

sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src', 'CordobaLib/src']
resources.srcDirs = ['src', 'CordobaLib/src']
aidl.srcDirs = ['src', 'CordobaLib/src']
renderscript.srcDirs = ['src', 'CordobaLib/src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
}

This should be added as a post script of the tool

Windows 10 ACUR rules using wildcards at the end are not supported

ManifoldJS generates the following include rule in Windows 10 when the input W3C manifest contains http://mydomain.com as start_url:

<uap:ApplicationContentUriRules>
 <uap:Rule Match="http://mydomain.com/*" Type="include" />
</uap:ApplicationContentUriRules>

However, when navigating to e.g. http://mydomain.com/somepath the URL is opened in the browser.

The following MSDN article describes the type of include rules that can be specified in a Windows 10 hosted web app: https://msdn.microsoft.com/en-us/library/windows/apps/dn705792.aspx

According to the above article, these are the ways to specify a URL match in the include rules:

  • An exact hostname
  • A hostname for which a URI with any subdomain of that hostname is included
  • An exact URI
  • An exact URI that can contain a query property
  • A partial path and a wildcard to indicate a particular file extension

Provide more details when an invalid manifest format is detected

This issue is based on a discussion on issue #28.

From @kenchris:

I guess getting as much right info out of the invalid manifest makes sense and issuing warnings instead. That way people would know how to contact cnet.com (if it is not them packaging up their own site :))

We could add a way to specify the kind of manifest used in order to retrieve more information or be more flexible with the manifest detection logic

Type-os on web site

http://www.manifoldjs.com/community

Contrbution Guidelines -> Contribution Guidelines
Contirbutions should -> Contributions should

You could also mention FirefoxOS app store in opening para

(I looked to see if website source was here so could do a PR but didn't find it)

CLI will not generate manifest on certain sites

OS: Windows 8.1

Method: CLI

When I point towards http://www.Babylonjs.com, it says that the file doesn’t have a manifest. This is expected, but I assumed it would try to generate a manifest on its own, as it had done for my personal website, but it does not.

I tried again on my person site, www.DaveVoyles.com and ran into an issue.

It runs into an issue when trying to find the icons. I noticed that on the web based generator, I don’t have any icons for my links, but it tries to force them with an empty box next to the links in the header.

Image 1: http://www.davevoyles.com/wp-content/uploads/2015/05/Manifold-Error-DaveVoylesdotcom.jpeg

I can run the Web Based Manifest Generator, and it all works fine. Here is an image of my website being running inside of the WIn Phone emulator running Cordova. I can see that isse with the icons here.

Image 2: http://www.davevoyles.com/wp-content/uploads/2015/05/Manifold-Windows-Phone.jpeg

Images are unnecessarily downloaded multiple times

The log, when in debug mode, shows that the same image is downloaded multiple times. This should not happen.

Even though the plugin's before_prepare hook runs more than once when building the project, it uses the last modified time of the downloaded image files to make conditional requests using the if-modified-since header, so it should download the images the first time only.

Fiddler shows that requests are always returning 200 OK. However, reissuing the same request using the Composer feature in Fiddler returns 304 Not Modified.

Sending an invalid start_url crashes process

Sending a junk url to projectBuilder.createApps() will throw a fatal error here that will crash the process instead of returning an error in the callback.

Error:

Building the project... { content:
   { start_url: 'http:',
     short_name: 'BingCom',
     icons: [],
     display: 'fullscreen',
     orientation: 'any' },
  format: 'w3c',
  errors: [ { member: 'start_url', issues: [Object] } ],
  suggestions:
   [ { member: 'icons', issues: [Object] },
     { member: 'mjs_urlAccess', issues: [Object] } ],
  warnings: [ { member: 'icons', issues: [Object] } ] } /Users/ryanbillingsley/Dev/manifold-api/tmp/0e3165c1 [ 'android', 'ios', 'chrome', 'firefox' ] false
Generating the Chrome application...
Generating the Firefox application...
Generating the Cordova application...
/Users/ryanbillingsley/Dev/manifold-api/node_modules/manifoldjs/lib/projectBuilder.js:430
            .replace(/-/g, '')
            ^
TypeError: Cannot read property 'replace' of null
    at createCordovaApp (/Users/ryanbillingsley/Dev/manifold-api/node_modules/manifoldjs/lib/projectBuilder.js:430:13)
    at /Users/ryanbillingsley/Dev/manifold-api/node_modules/manifoldjs/lib/projectBuilder.js:610:25
    at /Users/ryanbillingsley/Dev/manifold-api/node_modules/manifoldjs/node_modules/mkdirp/index.js:29:20
    at FSReqWrap.oncomplete (fs.js:95:15)

iOS emulator fails to launch if name field has spaces in it

This might be a Cordova error, but this is what happens:

$ cd cordova
$ cordova emulate ios
(errors out because the first word is prepended to the filename somehow)
$ (remove spaces in name field in manifest)
$ cordova emulate ios
(launches app)

Example: "name": "My App"
Temp filenames: "My My App.whatever"
Then cordova tries to launch My App and can't find it

Getting Window height and width

In my existing Website, I'm getting specific container size to automatically fill up the whole screen with an image (using $(window).height() and $(window).width()). It doesn't return any value when wrapped using ManifoldJS on Android.

Also, the $( window ).resize(function() { doesn't seem to work.

Any clue how to do something similar?

Needs examples

Are there any open-source boilerplate "apps" with all the assets and the manifest setup correctly so we can test ManifoldJS and see it in action?

Website is generating invalid manifests

Moving this to a new issue:

from @brandonros:

{
  "start_url": "http://google.com/",
  "short_name": "Google",
  "icons": [],
  "display": "fullscreen",
  "orientation": "any",
  "name": "Google",
  "description": "Search the web.",
  "version": "1.0",
  "build": "1",
  "publishername": "Google",
  "organizationid": "Google"
}

File generated directly from website.

➜ ~ manifoldjs http://google.com/ -p ios -b -m manifest.json
ERROR: Invalid manifest format.

Capabilities support in manifest

This discussion is based on the comments from issue #31.

Let's continue discussing about this topic in this new issue.

From @marcoscaceres:

For capabilities (again because of our focus on Web browsers), we were not able to find non-proprietary APIs that required a capabilities declaration (hence why they are missing from the spec right now).

From @kenchris:

Regarding capabilities:

With the permission spec (non-upfront permissions) this seems like a thing that will go away
Permissions differ a lot per platform
Due to these reasons, I think it is best that the tool will figure out what permissions to enable per platform.

AFAIU, I can use the Windows object on Windows and you will implement parts of that for other platforms using Cordova? Or Is it possible to use the Cordova APIs directly?

I think that we should create a msj_ extension here, but I need to find out exactly how all of this works in order to help you design such an extension :-)

If you support the Core Cordova APIs, we could add something like

"msj_cordova_plugin": ["battery-status", "contacts"]

where the name is taking from the plugin name itself (ie "org.apache.cordova.battery-status"). For each platform you already know which permissions each plugin requires.

If you don't support the Cordova APIs directly and just emulated Windows object, then we should find another solution. I kind of like the ability to use the core Cordova APIs though, as many hybrid apps do that already, like Untappd.

Provide default images when no images are specified in the manifest

Currently:

  • Images with the cordova logo are generated for cordova apps
  • Visual Studio's "placeholder" images are generated for windows 10 apps
  • No default images are provided for Chrome
  • No default images are provided for Firefox

Ideally:

  • The tool should provide default images with the manifoldJS logo for all the generated platforms, and for the corresponding sizes
  • The images should be hosted somewhere (should not be included in the package) and manifoldjs should request the images from there when generating the apps (at runtime)

Support for splashscreens member (W3C)

Just a heads up that we've added a splashscreens member to the W3C Web Manifest spec. However, we are still gathering implementer feedback and we currently don't have strong commitment from any vendor to support them (i.e., please don't add them to ManifoldJS just yet! 😄).

Will report back with more info soon. Design wise, they take the exact same object as icons (an array of image objects), so validation/transformation will be identical.

Failure if an existing manifest doesn't contain a start_url member

If a W3C manifest is found from the target Web site, it is being validated for containing a start_url member and a short_name member. However, the specification doesn't seem to mandate any members to be present (http://www.w3.org/TR/appmanifest/#manifest-and-its-members).

A good default behavior in this case might be to generate the values similarly to how they are generated if the site does not have a manifest, i.e., they are implied from the given Web site URL.

W3C App Manifest working group doesn't exist

"Special thanks to the W3C App Manifest working group"

We are editing the spec as part of the WebApps working group :)

You could say: "Special thanks to the W3C Web App Manifest editors and the W3C WebApps Working Group"

ERR! 404 'ManifoldJS' is not in the npm registry.

➜ ~ npm install -g ManifoldJS
npm ERR! Darwin 14.3.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "ManifoldJS"
npm ERR! node v0.12.2
npm ERR! npm v2.7.5
npm ERR! code E404

npm ERR! 404 Not Found: ManifoldJS
npm ERR! 404
npm ERR! 404 'ManifoldJS' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! Please include the following file with any support request:
npm ERR! /Users/marcos/npm-debug.log

One of the steps in Windows81-next-steps.md is to create an Apple developer account

I searched a little, but could not find the source of this file. Just so you know.

# Test - Build - Submit

## Test

1. Your application uses the same rendering and JavaScript Engine as the Internet Explorer Browser so most of you testing can be done on your website and in the browser.

2. To test your application on a device, download the ManifoldJS test harness from the Store, and follow the directions. _Coming soon!_

> **Note:** Looking for some debugging tools that work on all your platforms? Try [Vorlon.js](http://www.vorlonjs.io). It makes mobile testing a breeze, and works inside the app ManifoldJS apps.

## Build

1. Download and install Visual Studio (community edition works fine) and open the source code folder.

2. Open the Project in Visual Studio.

3. Use the store commands from Visual Studio to create the app package.

## Submit to Store

This is the bad part -

1. Register as an Apple developer [here](https://developer.apple.com/register/).

2. Reserve the name of your app.

3. Submit app package from store.

Add icon button confusion

could we only make the add icon button enabled when there is a valid URL in the icon box? The default values seem to be implemented incorrectly?

Some sites are returning error from `getManifestFromSite`

If I try and run my site www.tacosfeedthebear.com through getManifestFromSite I would expect a warning that no manifest exists and that a new one will be created, but instead I am seeing:

Error: Failed to retrieve manifest from site.

Stacktrace:

Error: Failed to retrieve manifest from site.
    at Request._callback (/Users/ryanbillingsley/Dev/manifold-api/node_modules/manifoldjs/lib/manifestTools.js:105:23)
    at Request.self.callback (/Users/ryanbillingsley/Dev/manifold-api/node_modules/manifoldjs/node_modules/request/request.js:368:22)
    at Request.emit (events.js:110:17)
    at Request.<anonymous> (/Users/ryanbillingsley/Dev/manifold-api/node_modules/manifoldjs/node_modules/request/request.js:1219:14)
    at Request.emit (events.js:129:20)
    at IncomingMessage.<anonymous> (/Users/ryanbillingsley/Dev/manifold-api/node_modules/manifoldjs/node_modules/request/request.js:1167:12)
    at IncomingMessage.emit (events.js:129:20)
    at _stream_readable.js:908:16
    at process._tickCallback (node.js:355:11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.