Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade/phoenix 1.3 #7

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
erl_crash.dump

# Static artifacts
/node_modules
/assets/node_modules

# Since we are building assets from web/static,
# we ignore priv/static. You may want to comment
Expand All @@ -27,5 +27,3 @@ erl_crash.dump
*.~un
.DS_Store
npm-debug*
*.swp
*.un~
3 changes: 3 additions & 0 deletions Capfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ require 'capistrano/setup'
# Include default deployment tasks
require 'capistrano/deploy'

require 'capistrano/scm/git'
install_plugin Capistrano::SCM::Git

# Include tasks from other gems included in your Gemfile
#
# For documentation on these, see for example:
Expand Down
21 changes: 9 additions & 12 deletions brunch-config.js → assets/brunch-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ exports.config = {
stylesheets: {
order: {
before: [
'web/static/vendor/css/pure-min.css',
'web/static/vendor/css/grids-responsive-min.css'
'vendor/css/pure-min.css',
'vendor/css/grids-responsive-min.css'
]
},
joinTo: {
'css/app.css': /^(web\/static\/css\/app)|(web\/static\/vendor\/css)/,
'css/admin.css': /^web\/static\/css\/admin/
'css/app.css': /^(css\/app)|(vendor\/css)/,
'css/admin.css': /^css\/admin/
}
},
templates: {
Expand All @@ -41,31 +41,28 @@ exports.config = {
// This option sets where we should place non-css and non-js assets in.
// By default, we set this to '/web/static/assets'. Files in this directory
// will be copied to `paths.public`, which is "priv/static" by default.
assets: /^(web\/static\/assets)/
assets: /^(static)/
},

// Phoenix paths configuration
paths: {
// Dependencies and current project directories to watch
watched: ["deps/phoenix/web/static",
"deps/phoenix_html/web/static",
"web/static", "test/static"],

watched: ["static", "css", "js", "vendor"],
// Where to compile files to
public: "priv/static"
public: "../priv/static"
},

// Configure your plugins
plugins: {
babel: {
// Do not use ES6 compiler in vendor code
ignore: [/web\/static\/vendor/]
ignore: [/vendor/]
}
},

modules: {
autoRequire: {
'js/app.js': ['web/static/js/app']
'js/app.js': ['js/app']
}
},

Expand Down
3 changes: 3 additions & 0 deletions assets/css/_font.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@import url("//hello.myfonts.net/count/2fd706");

@font-face {font-family: 'ITCAvantGardeW04-Bold';src: url('/fonts/2FD706_0_0.eot');src: url('/fonts/2FD706_0_0.eot?#iefix') format('embedded-opentype'),url('/fonts/2FD706_0_0.woff2') format('woff2'),url('/fonts/2FD706_0_0.woff') format('woff'),url('/fonts/2FD706_0_0.ttf') format('truetype');}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion web/static/js/app.js → assets/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
//
// If you no longer want to use a dependency, remember
// to also remove its path from "config.paths.watched".
import "deps/phoenix_html/web/static/js/phoenix_html"
import "phoenix_html"

// Import local files
//
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions web/static/js/socket.js → assets/js/socket.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

// To use Phoenix channels, the first step is to import Socket
// and connect at the socket path in "lib/my_app/endpoint.ex":
import {Socket} from "deps/phoenix/web/static/js/phoenix"
import {Socket} from "phoenix"

let socket = new Socket("/socket")
let socket = new Socket("/socket", {params: {token: window.userToken}})

// When you connect, you'll often need to authenticate the client.
// For example, imagine you have an authentication plug, `MyAuth`,
Expand Down
Loading