Skip to content

Commit

Permalink
updates to preset
Browse files Browse the repository at this point in the history
  • Loading branch information
reed-jones committed Mar 1, 2020
1 parent 7d403ae commit 6f196e0
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 39 deletions.
8 changes: 4 additions & 4 deletions packages/Phased/Preset/stubs/configs/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
theme: {},
variants: {},
plugins: [],
}
theme: {},
variants: {},
plugins: []
};
16 changes: 10 additions & 6 deletions packages/Phased/Preset/stubs/configs/webpack.mix.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
const mix = require("laravel-mix");
const path = require('path')
const tailwindcss = require("tailwindcss");
require("@phased/phase/mix"); // generates phase/phase/routing
require('laravel-mix-purgecss');
require('@phased/phase')

mix
.webpackConfig({
resolve: {
// aliases '@' to the base js folder to avoid
// annoying relative imports '../../../../SomeFile.vue'
alias: { "@": path.resolve(__dirname, "resources", "js") }
}
// aliases '@' to the base js folder
resolve: { alias: { "@": path.resolve(__dirname, "resources", "js") } }
})

// Setup TailwindCss
.options({
processCssUrls: false,
postCss: [tailwindcss("./tailwind.config.js")]
})

// Remove unused css in production
.purgeCss()

// Generate Phase Routes
.phase();
10 changes: 10 additions & 0 deletions packages/Phased/Preset/stubs/controllers/PhaseController.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,14 @@ public function AboutPage()
{
return Phase::view();
}

/**
* Api call to retrieve a random number from the server.
*/
public function getRandomNumber()
{
Vuex::state(['number' => random_int(0, 100)]);

return response()->vuex();
}
}
2 changes: 1 addition & 1 deletion packages/Phased/Preset/stubs/js/app.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import './bootstrap';
import Vue from 'vue';
import './bootstrap';
import App from './App.vue'
import router from './router'
import store from './store'
Expand Down
Empty file.
4 changes: 1 addition & 3 deletions packages/Phased/Preset/stubs/js/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ Vue.use(Vuex)

// modules
import app from './modules/app'
import todo from './modules/todo'

export default new Store({
modules: {
app,
todo
app
}
})
23 changes: 0 additions & 23 deletions packages/Phased/Preset/stubs/js/store/modules/todo.js

This file was deleted.

2 changes: 0 additions & 2 deletions packages/Phased/Preset/stubs/routes/counter.stub

This file was deleted.

0 comments on commit 6f196e0

Please sign in to comment.