既存のファイル化されているフロントコードを全てassetsに移動し、mixビルドの準備
This commit is contained in:
parent
70f007b6d2
commit
6a1848e311
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,6 +1,10 @@
|
|||||||
/node_modules
|
/node_modules
|
||||||
|
/public/css
|
||||||
|
/public/fonts
|
||||||
|
/public/js
|
||||||
/public/hot
|
/public/hot
|
||||||
/public/storage
|
/public/storage
|
||||||
|
/public/mix-manifest.json
|
||||||
/storage/*.key
|
/storage/*.key
|
||||||
/vendor
|
/vendor
|
||||||
/.idea
|
/.idea
|
||||||
|
21
resources/assets/js/app.js
vendored
21
resources/assets/js/app.js
vendored
@ -1,22 +1 @@
|
|||||||
|
|
||||||
/**
|
|
||||||
* First we will load all of this project's JavaScript dependencies which
|
|
||||||
* includes Vue and other libraries. It is a great starting point when
|
|
||||||
* building robust, powerful web applications using Vue and Laravel.
|
|
||||||
*/
|
|
||||||
|
|
||||||
require('./bootstrap');
|
require('./bootstrap');
|
||||||
|
|
||||||
window.Vue = require('vue');
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Next, we will create a fresh Vue application instance and attach it to
|
|
||||||
* the page. Then, you may begin adding components to this application
|
|
||||||
* or customize the JavaScript scaffolding to fit your unique needs.
|
|
||||||
*/
|
|
||||||
|
|
||||||
Vue.component('example', require('./components/Example.vue'));
|
|
||||||
|
|
||||||
const app = new Vue({
|
|
||||||
el: '#app'
|
|
||||||
});
|
|
||||||
|
60
resources/assets/js/bootstrap.js
vendored
60
resources/assets/js/bootstrap.js
vendored
@ -1,53 +1,17 @@
|
|||||||
|
// jQuery
|
||||||
|
import './tissue';
|
||||||
|
|
||||||
window._ = require('lodash');
|
// Setup global request header
|
||||||
|
const token = document.head.querySelector('meta[name="csrf-token"]');
|
||||||
/**
|
if (!token) {
|
||||||
* We'll load jQuery and the Bootstrap jQuery plugin which provides support
|
|
||||||
* for JavaScript based Bootstrap features such as modals and tabs. This
|
|
||||||
* code may be modified to fit the specific needs of your application.
|
|
||||||
*/
|
|
||||||
|
|
||||||
try {
|
|
||||||
window.$ = window.jQuery = require('jquery');
|
|
||||||
|
|
||||||
require('bootstrap-sass');
|
|
||||||
} catch (e) {}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* We'll load the axios HTTP library which allows us to easily issue requests
|
|
||||||
* to our Laravel back-end. This library automatically handles sending the
|
|
||||||
* CSRF token as a header based on the value of the "XSRF" token cookie.
|
|
||||||
*/
|
|
||||||
|
|
||||||
window.axios = require('axios');
|
|
||||||
|
|
||||||
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Next we will register the CSRF Token as a common header with Axios so that
|
|
||||||
* all outgoing HTTP requests automatically have it attached. This is just
|
|
||||||
* a simple convenience so we don't have to attach every token manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
let token = document.head.querySelector('meta[name="csrf-token"]');
|
|
||||||
|
|
||||||
if (token) {
|
|
||||||
window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content;
|
|
||||||
} else {
|
|
||||||
console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token');
|
console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
$.ajaxSetup({
|
||||||
* Echo exposes an expressive API for subscribing to channels and listening
|
headers: {
|
||||||
* for events that are broadcast by Laravel. Echo and event broadcasting
|
'X-CSRF-TOKEN': token.content
|
||||||
* allows your team to easily build robust real-time web applications.
|
}
|
||||||
*/
|
});
|
||||||
|
|
||||||
// import Echo from 'laravel-echo'
|
// Bootstrap
|
||||||
|
import 'bootstrap';
|
||||||
// window.Pusher = require('pusher-js');
|
|
||||||
|
|
||||||
// window.Echo = new Echo({
|
|
||||||
// broadcaster: 'pusher',
|
|
||||||
// key: 'your-pusher-key'
|
|
||||||
// });
|
|
||||||
|
@ -1,23 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="container">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-8 col-md-offset-2">
|
|
||||||
<div class="panel panel-default">
|
|
||||||
<div class="panel-heading">Example Component</div>
|
|
||||||
|
|
||||||
<div class="panel-body">
|
|
||||||
I'm an example component!
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
mounted() {
|
|
||||||
console.log('Component mounted.')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
38
resources/assets/sass/_variables.scss
vendored
38
resources/assets/sass/_variables.scss
vendored
@ -1,38 +0,0 @@
|
|||||||
|
|
||||||
// Body
|
|
||||||
$body-bg: #f5f8fa;
|
|
||||||
|
|
||||||
// Borders
|
|
||||||
$laravel-border-color: darken($body-bg, 10%);
|
|
||||||
$list-group-border: $laravel-border-color;
|
|
||||||
$navbar-default-border: $laravel-border-color;
|
|
||||||
$panel-default-border: $laravel-border-color;
|
|
||||||
$panel-inner-border: $laravel-border-color;
|
|
||||||
|
|
||||||
// Brands
|
|
||||||
$brand-primary: #3097D1;
|
|
||||||
$brand-info: #8eb4cb;
|
|
||||||
$brand-success: #2ab27b;
|
|
||||||
$brand-warning: #cbb956;
|
|
||||||
$brand-danger: #bf5329;
|
|
||||||
|
|
||||||
// Typography
|
|
||||||
$icon-font-path: "~bootstrap-sass/assets/fonts/bootstrap/";
|
|
||||||
$font-family-sans-serif: "Raleway", sans-serif;
|
|
||||||
$font-size-base: 14px;
|
|
||||||
$line-height-base: 1.6;
|
|
||||||
$text-color: #636b6f;
|
|
||||||
|
|
||||||
// Navbar
|
|
||||||
$navbar-default-bg: #fff;
|
|
||||||
|
|
||||||
// Buttons
|
|
||||||
$btn-default-color: $text-color;
|
|
||||||
|
|
||||||
// Inputs
|
|
||||||
$input-border: lighten($text-color, 40%);
|
|
||||||
$input-border-focus: lighten($brand-primary, 25%);
|
|
||||||
$input-color-placeholder: lighten($text-color, 30%);
|
|
||||||
|
|
||||||
// Panels
|
|
||||||
$panel-default-heading-bg: #fff;
|
|
15
resources/assets/sass/app.scss
vendored
15
resources/assets/sass/app.scss
vendored
@ -1,9 +1,8 @@
|
|||||||
|
|
||||||
// Fonts
|
|
||||||
@import url("https://fonts.googleapis.com/css?family=Raleway:300,400,600");
|
|
||||||
|
|
||||||
// Variables
|
|
||||||
@import "variables";
|
|
||||||
|
|
||||||
// Bootstrap
|
// Bootstrap
|
||||||
@import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap";
|
@import "~bootstrap/scss/bootstrap";
|
||||||
|
|
||||||
|
// Open Iconic
|
||||||
|
@import "~open-iconic/font/css/open-iconic-bootstrap";
|
||||||
|
|
||||||
|
// Legacy app styles
|
||||||
|
@import "tissue.css";
|
5
webpack.mix.js
vendored
5
webpack.mix.js
vendored
@ -12,4 +12,7 @@ let mix = require('laravel-mix');
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
mix.js('resources/assets/js/app.js', 'public/js')
|
mix.js('resources/assets/js/app.js', 'public/js')
|
||||||
.sass('resources/assets/sass/app.scss', 'public/css');
|
.sass('resources/assets/sass/app.scss', 'public/css')
|
||||||
|
.autoload({
|
||||||
|
'jquery': ['$', 'jQuery', 'window.jQuery']
|
||||||
|
});
|
Loading…
Reference in New Issue
Block a user