-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Axa Mei Liauw
committed
Jul 24, 2018
1 parent
38a3e55
commit 29e75f4
Showing
27 changed files
with
10,079 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"presets": [ | ||
["env", { | ||
"modules": false, | ||
"targets": { | ||
"browsers": "> 1%", | ||
"uglify": true | ||
}, | ||
"useBuiltIns": true | ||
}] | ||
], | ||
|
||
"plugins": [ | ||
"syntax-dynamic-import", | ||
"transform-object-rest-spread", | ||
["transform-class-properties", { "spec": true }] | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
plugins: | ||
postcss-import: {} | ||
postcss-cssnext: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Procfile | ||
backend: bin/rails s -p 3000 | ||
frontend: bin/webpack-dev-server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
$white: #ffffff; | ||
$black: #000000; | ||
$dark-gray: #494f57; | ||
$blacklight-gray: #777; | ||
$gray: #e8e6df; | ||
$light-gray: #f1f2f3; | ||
$dark-orange: #9F620D; | ||
$orange: #e87511; | ||
$blue: #3072AB; | ||
$brand-danger: #a94442; | ||
$yellow-light: #fee7ba; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<template> | ||
<div id="app"> | ||
<p>{{ message }}</p> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
data: function () { | ||
return { | ||
message: "Hello Vue!" | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<style scoped> | ||
p { | ||
font-size: 2em; | ||
text-align: center; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* eslint no-console:0 */ | ||
// This file is automatically compiled by Webpack, along with any other files | ||
// present in this directory. You're encouraged to place your actual application logic in | ||
// a relevant structure within app/javascript and only use these pack files to reference | ||
// that code so it'll be compiled. | ||
// | ||
// To reference this file, add <%= javascript_pack_tag 'application' %> to the appropriate | ||
// layout file, like app/views/layouts/application.html.erb | ||
|
||
|
||
import Vue from 'vue/dist/vue.esm' | ||
import system from 'lux-design-system' | ||
import 'lux-design-system/lib/system/system.css' | ||
import TurbolinksAdapter from 'vue-turbolinks' | ||
// import store from '../store' | ||
|
||
Vue.use(system) | ||
Vue.use(TurbolinksAdapter) | ||
|
||
// create the LUX app and mount it to a wrapper with data-behavior="vue" | ||
document.addEventListener('turbolinks:load', () => { | ||
const app = new Vue({ | ||
el: '[data-behavior="vue"]' | ||
// store | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
/* eslint no-console: 0 */ | ||
// Run this example by adding <%= javascript_pack_tag 'hello_vue' %> (and | ||
// <%= stylesheet_pack_tag 'hello_vue' %> if you have styles in your component) | ||
// to the head of your layout file, | ||
// like app/views/layouts/application.html.erb. | ||
// All it does is render <div>Hello Vue</div> at the bottom of the page. | ||
|
||
import Vue from 'vue' | ||
import App from '../app.vue' | ||
|
||
document.addEventListener('DOMContentLoaded', () => { | ||
const el = document.body.appendChild(document.createElement('hello')) | ||
const app = new Vue({ | ||
el, | ||
render: h => h(App) | ||
}) | ||
|
||
console.log(app) | ||
}) | ||
|
||
|
||
// The above code uses Vue without the compiler, which means you cannot | ||
// use Vue to target elements in your existing html templates. You would | ||
// need to always use single file components. | ||
// To be able to target elements in your existing html/erb templates, | ||
// comment out the above code and uncomment the below | ||
// Add <%= javascript_pack_tag 'hello_vue' %> to your layout | ||
// Then add this markup to your html template: | ||
// | ||
// <div id='hello'> | ||
// {{message}} | ||
// <app></app> | ||
// </div> | ||
|
||
|
||
// import Vue from 'vue/dist/vue.esm' | ||
// import App from '../app.vue' | ||
// | ||
// document.addEventListener('DOMContentLoaded', () => { | ||
// const app = new Vue({ | ||
// el: '#hello', | ||
// data: { | ||
// message: "Can you say hello?" | ||
// }, | ||
// components: { App } | ||
// }) | ||
// }) | ||
// | ||
// | ||
// | ||
// If the using turbolinks, install 'vue-turbolinks': | ||
// | ||
// yarn add 'vue-turbolinks' | ||
// | ||
// Then uncomment the code block below: | ||
// | ||
// import TurbolinksAdapter from 'vue-turbolinks' | ||
// import Vue from 'vue/dist/vue.esm' | ||
// import App from '../app.vue' | ||
// | ||
// Vue.use(TurbolinksAdapter) | ||
// | ||
// document.addEventListener('turbolinks:load', () => { | ||
// const app = new Vue({ | ||
// el: '#hello', | ||
// data: { | ||
// message: "Can you say hello?" | ||
// }, | ||
// components: { App } | ||
// }) | ||
// }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<%= render 'pul-assets/footer' %> | ||
<%= render 'shared/analytics' %> | ||
<footer role="contentinfo"> | ||
<library-footer></library-footer> | ||
</footer> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<header role="banner"> | ||
<library-header app-name="<%= header_title %>" app-url="<%= root_path %>"> | ||
<% if current_user %> | ||
<dropdown-menu> | ||
<input-button variation="dropdown"><%= current_user %></input-button> | ||
<menu-bar type="nav" active="All" :menu-items="[ | ||
<% if current_exhibit and can? :curate, current_exhibit %> | ||
{name: '<%= t('spotlight.dashboards.show.header') %>', component: '<%= t('spotlight.dashboards.show.header') %>', href: '<%= spotlight.exhibit_dashboard_path(current_exhibit) %>'}, | ||
<% end %> | ||
<% if can? :create, Spotlight::Exhibit %> | ||
{name: '<%= t(:'helpers.action.spotlight/exhibit.create') %>', component: '<%= t(:'helpers.action.spotlight/exhibit.create') %>', href: '<%= spotlight.new_exhibit_path %>'}, | ||
<% end %> | ||
{name: '<%= t('spotlight.header_links.logout') %>', component: '<%= t('spotlight.header_links.logout') %>', href: '<%= main_app.destroy_user_session_path %>'} | ||
]"/> | ||
</dropdown-menu> | ||
<% else %> | ||
<menu-bar type="nav" :menu-items="[ | ||
{name: '<%= t('spotlight.header_links.login') %>', component: '<%= t('spotlight.header_links.login') %>', href: '<%= new_user_session_path %>'}, | ||
<% if current_exhibit and show_contact_form? %> | ||
{name: '<%= t('spotlight.header_links.contact') %>', component: '<%= t('spotlight.header_links.contact') %>', href: '<%= spotlight.new_exhibit_contact_form_path(current_exhibit) %>'} | ||
<% end %> | ||
]"/> | ||
<% end %> | ||
</library-header> | ||
</header> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env ruby | ||
|
||
ENV["RAILS_ENV"] ||= ENV["RACK_ENV"] || "development" | ||
ENV["NODE_ENV"] ||= "development" | ||
|
||
require "pathname" | ||
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", | ||
Pathname.new(__FILE__).realpath) | ||
|
||
require "rubygems" | ||
require "bundler/setup" | ||
|
||
require "webpacker" | ||
require "webpacker/webpack_runner" | ||
Webpacker::WebpackRunner.run(ARGV) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env ruby | ||
|
||
ENV["RAILS_ENV"] ||= ENV["RACK_ENV"] || "development" | ||
ENV["NODE_ENV"] ||= "development" | ||
|
||
require "pathname" | ||
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", | ||
Pathname.new(__FILE__).realpath) | ||
|
||
require "rubygems" | ||
require "bundler/setup" | ||
|
||
require "webpacker" | ||
require "webpacker/dev_server_runner" | ||
Webpacker::DevServerRunner.run(ARGV) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
process.env.NODE_ENV = process.env.NODE_ENV || 'development' | ||
|
||
const environment = require('./environment') | ||
|
||
module.exports = environment.toWebpackConfig() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
const { environment } = require('@rails/webpacker') | ||
const vue = require('./loaders/vue') | ||
|
||
environment.loaders.append('vue', vue) | ||
module.exports = environment |
Oops, something went wrong.