Code Monkey home page Code Monkey logo

ember-pagefront's Introduction

ember-pagefront

This is the official Pagefront Ember addon. For more information on deploying with Pagefront, please check out the docs.

Installation

  • ember install ember-pagefront --app=YOUR_UNIQUE_APP_NAME

Deploying

  • ember deploy production

ember-pagefront's People

Contributors

elwayman02 avatar ghedamat avatar jasonkriss avatar rmachielse avatar willrax avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

ember-pagefront's Issues

TypeError: Path must be a string. Received null

I'm getting the following error when doing ember deploy production

TypeError: Path must be a string. Received null
    at assertPath (path.js:7:11)
    at join (path.js:1211:7)
    at fetchSha (/Users/Adtechmedia/Projects/drugsearch/node_modules/ember-pagefront/node_modules/ember-cli-deploy-pagefront/lib/fetch-commit.js:26:22)
    at module.exports (/Users/Adtechmedia/Projects/drugsearch/node_modules/ember-pagefront/node_modules/ember-cli-deploy-pagefront/lib/fetch-commit.js:48:10)
    at Class._uploadIndex (/Users/Adtechmedia/Projects/drugsearch/node_modules/ember-pagefront/node_modules/ember-cli-deploy-pagefront/index.js:124:22)
    at tryCatch (/Users/Adtechmedia/Projects/drugsearch/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:538:12)
    at invokeCallback (/Users/Adtechmedia/Projects/drugsearch/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:553:13)
    at publish (/Users/Adtechmedia/Projects/drugsearch/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:521:7)
    at flush (/Users/Adtechmedia/Projects/drugsearch/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:2373:5)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
Pipeline aborted

here are my package.json dependencies

  "devDependencies": {
    "broccoli-asset-rev": "^2.4.5",
    "ember-ajax": "^2.4.1",
    "ember-bootstrap": "0.11.1",
    "ember-cli": "2.9.1",
    "ember-cli-app-version": "^2.0.0",
    "ember-cli-babel": "5.1.10",
    "ember-cli-dependency-checker": "^1.3.0",
    "ember-cli-deploy": "1.0.0-beta.1",
    "ember-cli-htmlbars": "^1.0.10",
    "ember-cli-htmlbars-inline-precompile": "^0.3.3",
    "ember-cli-icheck": "0.0.7",
    "ember-cli-inject-live-reload": "^1.4.1",
    "ember-cli-jshint": "^1.0.4",
    "ember-cli-moment-shim": "2.2.1",
    "ember-cli-qunit": "^3.0.1",
    "ember-cli-release": "^0.2.9",
    "ember-cli-sass": "5.6.0",
    "ember-cli-sri": "^2.1.0",
    "ember-cli-test-loader": "^1.1.0",
    "ember-cli-uglify": "^1.2.0",
    "ember-component-css": "0.2.1",
    "ember-data": "^2.9.0",
    "ember-export-application-global": "^1.0.5",
    "ember-font-awesome": "2.2.0",
    "ember-load-initializers": "^0.5.1",
    "ember-moment": "6.1.0",
    "ember-pagefront": "0.11.2",
    "ember-pikaday": "2.2.0",
    "ember-power-select": "1.0.0-beta.28",
    "ember-radio-button": "1.0.7",
    "ember-resolver": "^2.0.3",
    "ember-responsive": "2.0.0",
    "ember-transition-helper": "0.0.6",
    "ember-truth-helpers": "1.2.0",
    "ember-welcome-page": "^1.0.3",
    "loader.js": "^4.0.10"
  }

and my bower.json dependencies

  "dependencies": {
    "ember": "~2.9.0",
    "ember-cli-shims": "0.1.3",
    "bootstrap": "~3.3.5",
    "bootstrap-sass": "^3.3.7",
    "font-awesome": "~4.5.0",
    "iCheck": "^1.0.2"
  }

I'm using node v6.9.1

Any thoughts on this?

Descriptive error message

I recently had a problem deploying my app (#21) and when I read the error message, it gave me no insight as to what the problem was:

ubuntu@box4587:~/dashboard$ ember deploy production --verbose
Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
DEPRECATION: Overriding init without calling this._super is deprecated. Please call `this._super.init && this._super.init.apply(this, arguments);` addon: `undefined`
    at Object.<anonymous> (/home/ubuntu/dashboard/node_modules/ember-cli-deploy/lib/tasks/pipeline.js:11:23)
DEPRECATION: Overriding init without calling this._super is deprecated. Please call `this._super.init && this._super.init.apply(this, arguments);` addon: `undefined`
    at Object.<anonymous> (/home/ubuntu/dashboard/node_modules/ember-cli-deploy/lib/tasks/deploy.js:6:23)
Registering hook -> configure[build]
Registering hook -> build[build]
Registering hook -> configure[display-revisions]
Registering hook -> configure[gzip]
Registering hook -> willUpload[gzip]
Registering hook -> configure[manifest]
Registering hook -> willUpload[manifest]
Registering hook -> configure[pagefront]
Registering hook -> willDeploy[pagefront]
Registering hook -> upload[pagefront]
Registering hook -> configure[revision-data]
Registering hook -> prepare[revision-data]
Executing pipeline
|
+- configure
|  |
|  +- build
|    - validating config
|    - Missing config: `environment`, using default: `production`
|    - Missing config: `outputPath`, using default: `tmp/deploy-dist`
|    - config ok
|  |
|  +- display-revisions
|    - validating config
|    - Missing config: `amount`, using default: `[Function]`
|    - config ok
|  |
|  +- gzip
|    - validating config
|    - Missing config: `filePattern`, using default: `**/!(*.html)`
|    - Missing config: `zopfli`, using default: `false`
|    - Missing config: `keep`, using default: `false`
|    - Missing config: `distDir`, using default: `[Function]`
|    - Missing config: `distFiles`, using default: `[Function]`
|    - config ok
|  |
|  +- manifest
|    - validating config
|    - Missing config: `filePattern`, using default: `**/!(*.html)`
|    - Missing config: `manifestPath`, using default: `manifest.txt`
|    - Missing config: `distDir`, using default: `[Function]`
|    - Missing config: `distFiles`, using default: `[Function]`
|    - config ok
|  |
|  +- pagefront
|    - validating config
|    - config ok
|  |
|  +- revision-data
|    - validating config
|    - Missing config: `type`, using default: `file-hash`
|    - Missing config: `filePattern`, using default: `index.html`
|    - Missing config: `distDir`, using default: `[Function]`
|    - Missing config: `distFiles`, using default: `[Function]`
|    - Missing config: `versionFile`, using default: `package.json`
|    - config ok
|
+- setup
|
+- willDeploy
|  |
|  +- pagefront
|    - Preparing for deploy...
|
+- willBuild
|
+- build
|  |
|  +- build
|    - building app to `tmp/deploy-dist` using buildEnv `production`...
cleaning up
cleaning up...
|    - ✔  assets/dashboard-a6f32008fbe04a2c5d68ec2e0c9832fd.js
|    - ✔  assets/dashboard-d41d8cd98f00b204e9800998ecf8427e.css
|    - ✔  assets/vendor-d41d8cd98f00b204e9800998ecf8427e.css
|    - ✔  assets/vendor-e675cb22f0a6494e18de01548a4e6325.js
|    - ✔  crossdomain.xml
|    - ✔  images/FS-logo-blue-mark-7b41c0a79922ea8aa04a38f72a3f122f.png
|    - ✔  index.html
|    - ✔  robots.txt
|    - build ok
|
+- didBuild
|
+- willPrepare
|
+- prepare
|  |
|  +- revision-data
|    - creating revision data using `file-hash`
|    - generated revision data for revision: `e5a764db59402dbe711feb468fba1ad3`
|
+- didPrepare
|
+- willUpload
|  |
|  +- gzip
|    - gzipping `**/!(*.html)`
|    - ✔  assets/dashboard-d41d8cd98f00b204e9800998ecf8427e.css
|    - ✔  assets/vendor-d41d8cd98f00b204e9800998ecf8427e.css
|    - ✔  assets/dashboard-a6f32008fbe04a2c5d68ec2e0c9832fd.js
|    - ✔  crossdomain.xml
|    - ✔  robots.txt
|    - ✔  images/FS-logo-blue-mark-7b41c0a79922ea8aa04a38f72a3f122f.png
|    - ✔  assets/vendor-e675cb22f0a6494e18de01548a4e6325.js
|    - gzipped 7 files ok
|  |
|  +- manifest
|    - generating manifest at `manifest.txt`
|    - generated manifest including 7 files ok
|
+- upload
|  |
|  +- pagefront
|
+- didFail
[object Object]
undefined|
Pipeline aborted

I'd like to suggest a more descriptive error message than [object Object] undefined| Pipeline aborted so that the developer can debug the issue.

Consider namespacing CLI commands

Has PageFront considered namespacing the cli commands that it is introducing? Instead of using ember claim and ember login, maybe the commands could be ember pagefront:claim and ember pagefront:login? The current approach certainly makes the commands feel like an integral part of ember-cli, but that may have drawbacks down the line.

I can see two benefits to moving to namespaced commands:

  1. As PageFront inevitably adds more CLI commands, this would avoid naming collisions with other addons or new ember-cli core commands.
  2. Every namespaced command reinforces the PageFront brand even though deploy is ember deploy, much like Heroku CLI commands do (heroku config..., heroku run..., etc) though Heroku's deploy flow is simply a git push.

Error installing

If this is the package for www.pagefronthq.com, then there are problems trying to load the package, using the (somewhat sparse) docs:

ember install ember-pagefront --app=mindstorm
Future versions of Ember CLI will not support v4.2.1. Please update to Node 0.12 or io.js.
version: 1.13.8
The option '--app' is not registered with the install command. Run ember install --help for a list of supported options.
Installed packages for tooling via npm.
installing ember-pagefront
install package ember-cli-deploy
Installed packages for tooling via npm.
create .pagefrontrc
create config/deploy.js
key is not defined (Error in blueprint template: /Users/john/Devel/ember/mindstorm/node_modules/ember-pagefront/blueprints/ember-pagefront/files/.pagefrontrc)
ReferenceError: key is not defined (Error in blueprint template: /Users/john/Devel/ember/mindstorm/node_modules/ember-pagefront/blueprints/ember-pagefront/files/.pagefrontrc)
at eval (eval at (/Users/john/Devel/ember/mindstorm/node_modules/ember-cli/node_modules/lodash/string/template.js:214:12), :8:11)
at processTemplate (/Users/john/Devel/ember/mindstorm/node_modules/ember-cli/lib/models/file-info.js:13:52)
at /Users/john/Devel/ember/mindstorm/node_modules/ember-cli/lib/models/file-info.js:94:20
at lib$rsvp$$internal$$tryCatch (/Users/john/Devel/ember/mindstorm/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:493:16)
at lib$rsvp$$internal$$invokeCallback (/Users/john/Devel/ember/mindstorm/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:505:17)
at lib$rsvp$$internal$$publish (/Users/john/Devel/ember/mindstorm/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:476:11)
at lib$rsvp$asap$$flush (/Users/john/Devel/ember/mindstorm/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:1198:9)
at doNTCallback0 (node.js:417:9)
at process._tickCallback (node.js:346:13)

Deploy fails/dashboard inaccessible

Just tried a deploy today and it fails every time.

ember deploy production

version: 1.13.13
- Preparing for deploy...
[object Object]
undefinedPipeline aborted

It's not very descriptive.

Looks like an API issue with the server

XMLHttpRequest cannot load https://api.pagefronthq.com/user. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://dashboard.pagefronthq.com' is therefore not allowed access. The response had HTTP status code 503.

Fonts not loading correctly on mobile, bad static handling?

Something like ember-cli/ember-cli#1532 tested on Galaxy Note 2.

Although I'm using ember-cli 1.13.13. Basically I have the fonts, and a verbose deploy shows that they are uploaded but when I try to access the font from the browser I get html back: https://scg.pagefrontapp.com/fonts/fontawesome-webfont.woff2?v=4.5.0

An in chrome (desktop) I get:

Failed to decode downloaded font: https://scg.pagefrontapp.com/fonts/fontawesome-webfont.woff2?v=4.5.0
scg.pagefrontapp.com/:1 OTS parsing error: invalid version tag

Pipeline aborted

I'm not sure if I've found a bug with the plugin but I've been able to ember deploy production from my local machine successfully but the build fails on CircleCi.

ubuntu@box4587:~/dashboard$ ember deploy production --verbose
Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
DEPRECATION: Overriding init without calling this._super is deprecated. Please call `this._super.init && this._super.init.apply(this, arguments);` addon: `undefined`
    at Object.<anonymous> (/home/ubuntu/dashboard/node_modules/ember-cli-deploy/lib/tasks/pipeline.js:11:23)
DEPRECATION: Overriding init without calling this._super is deprecated. Please call `this._super.init && this._super.init.apply(this, arguments);` addon: `undefined`
    at Object.<anonymous> (/home/ubuntu/dashboard/node_modules/ember-cli-deploy/lib/tasks/deploy.js:6:23)
Registering hook -> configure[build]
Registering hook -> build[build]
Registering hook -> configure[display-revisions]
Registering hook -> configure[gzip]
Registering hook -> willUpload[gzip]
Registering hook -> configure[manifest]
Registering hook -> willUpload[manifest]
Registering hook -> configure[pagefront]
Registering hook -> willDeploy[pagefront]
Registering hook -> upload[pagefront]
Registering hook -> configure[revision-data]
Registering hook -> prepare[revision-data]
Executing pipeline
|
+- configure
|  |
|  +- build
|    - validating config
|    - Missing config: `environment`, using default: `production`
|    - Missing config: `outputPath`, using default: `tmp/deploy-dist`
|    - config ok
|  |
|  +- display-revisions
|    - validating config
|    - Missing config: `amount`, using default: `[Function]`
|    - config ok
|  |
|  +- gzip
|    - validating config
|    - Missing config: `filePattern`, using default: `**/!(*.html)`
|    - Missing config: `zopfli`, using default: `false`
|    - Missing config: `keep`, using default: `false`
|    - Missing config: `distDir`, using default: `[Function]`
|    - Missing config: `distFiles`, using default: `[Function]`
|    - config ok
|  |
|  +- manifest
|    - validating config
|    - Missing config: `filePattern`, using default: `**/!(*.html)`
|    - Missing config: `manifestPath`, using default: `manifest.txt`
|    - Missing config: `distDir`, using default: `[Function]`
|    - Missing config: `distFiles`, using default: `[Function]`
|    - config ok
|  |
|  +- pagefront
|    - validating config
|    - config ok
|  |
|  +- revision-data
|    - validating config
|    - Missing config: `type`, using default: `file-hash`
|    - Missing config: `filePattern`, using default: `index.html`
|    - Missing config: `distDir`, using default: `[Function]`
|    - Missing config: `distFiles`, using default: `[Function]`
|    - Missing config: `versionFile`, using default: `package.json`
|    - config ok
|
+- setup
|
+- willDeploy
|  |
|  +- pagefront
|    - Preparing for deploy...
|
+- willBuild
|
+- build
|  |
|  +- build
|    - building app to `tmp/deploy-dist` using buildEnv `production`...
cleaning up
cleaning up...
|    - ✔  assets/dashboard-a6f32008fbe04a2c5d68ec2e0c9832fd.js
|    - ✔  assets/dashboard-d41d8cd98f00b204e9800998ecf8427e.css
|    - ✔  assets/vendor-d41d8cd98f00b204e9800998ecf8427e.css
|    - ✔  assets/vendor-e675cb22f0a6494e18de01548a4e6325.js
|    - ✔  crossdomain.xml
|    - ✔  images/FS-logo-blue-mark-7b41c0a79922ea8aa04a38f72a3f122f.png
|    - ✔  index.html
|    - ✔  robots.txt
|    - build ok
|
+- didBuild
|
+- willPrepare
|
+- prepare
|  |
|  +- revision-data
|    - creating revision data using `file-hash`
|    - generated revision data for revision: `e5a764db59402dbe711feb468fba1ad3`
|
+- didPrepare
|
+- willUpload
|  |
|  +- gzip
|    - gzipping `**/!(*.html)`
|    - ✔  assets/dashboard-d41d8cd98f00b204e9800998ecf8427e.css
|    - ✔  assets/vendor-d41d8cd98f00b204e9800998ecf8427e.css
|    - ✔  assets/dashboard-a6f32008fbe04a2c5d68ec2e0c9832fd.js
|    - ✔  crossdomain.xml
|    - ✔  robots.txt
|    - ✔  images/FS-logo-blue-mark-7b41c0a79922ea8aa04a38f72a3f122f.png
|    - ✔  assets/vendor-e675cb22f0a6494e18de01548a4e6325.js
|    - gzipped 7 files ok
|  |
|  +- manifest
|    - generating manifest at `manifest.txt`
|    - generated manifest including 7 files ok
|
+- upload
|  |
|  +- pagefront
|
+- didFail
[object Object]
undefined|
Pipeline aborted

Also, CircleCi has the environment PAGEFRONT_KEY variable.
The build fails even with the ember-cli-deploy-pagefront plugin.

Don't overwrite .env.deploy.production

During the initial running of ember install ember-pagefront --app=[appname], I get the same ember diff workflow that I see when updating ember-cli. This is good because I can choose to keep other custom settings I may have inside .env.deploy.production.

However, somewhere along the line (I believe it's when I run the ember login command to enable deploys to staging and development), my .env.deploy.production gets entirely overwritten with a version that only contains PAGEFRONT_KEY.

I would suggest that ember-pagefront not completely wipe out the user's local .env.deploy.* files but instead just append PAGEFRONT_KEY to them (or change that one env variable). Though the primary use case for PageFront would indeed have that key be the only value in the .env.deploy.* files, there are scenarios when some users may have other variables stored in this file as well.

"That app name has already been taken"

Good day,

I'm trying to deploy an ember app using this utility, and when I run the command:

ember install ember-pagefront --app=YOUR_UNIQUE_APP_NAME

every string I supply as the app name argument is rejected with the following message:

Darn. That app name has already been taken. Try again with a new name: ...

I've gone so far as to generate random hexadecimal strings, and concatenate several together, to no avail. When I check what should be the URL of the page front app with that supposedly taken name, it doesn't exist. I believe there's some part of this project that checks existing names, which is broken. Please let me know if I can help test or supply any further information, and have a great day.

Cheers!

Environment not properly set when deploying

When I am deploying to my staging (and presumably development) environment it is being deployed with the default environment of 'production'. Any thoughts on where I should be adding this?

Still active?

I'm using Pagefront for a number of apps but not seeing that it's still being maintained... never received responses on Twitter or e-mail. Just doing a wellness check!

Proxies inaccessible

I tried https://myapp.pagefrontapp.com/--/proxies/myproxy and I get the UnrecognizedUrl error in the console, meaning Ember tries to load it and can't find the route.

Am I using the proxy correctly?

Deprecation warning in Ember 2.x apps

If ember-pagefront runs in an Ember 2 app (Ember 2.2.0, to be precise), the following deprecation warning is printed to the console:

The initialize method for Application initializer 'pagefront-beacon' should take only one argument - App, an instance of an Application

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.