Skip to content

Instantly share code, notes, and snippets.

View cristijora's full-sized avatar

Cristi Jora cristijora

View GitHub Profile
devServer: {
proxy: {
'*': {
target: 'http://localhost:5001',
changeOrigin: true
}
}
},
if (process.env.NODE_ENV === 'production') {
module.exports.devtool = '#source-map'
// http://vue-loader.vuejs.org/en/workflow/production.html
module.exports.plugins = (module.exports.plugins || []).concat([
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: '"production"'
}
}),
new webpack.optimize.UglifyJsPlugin({
public class HomeController : Controller
{
public ActionResult Index()
{
ViewBag.Message = "Message from Controller";
return View();
}
}
@using System.Web.Optimization
@{
ViewBag.Title = "Home Page";
}
<div id="app">
<h3>@ViewBag.Message</h3>
{{ vueMessage }}
</div>
<template>
<div class="time">
{{ time }}
</div>
</template>
<script>
export default {
props: {
time: {
type: Object,
...
import FirstComponent from './FirstComponent.vue'
...
el: '#app',
components: {
FirstComponent
},
<div id="app">
<h3>@ViewBag.Message</h3>
{{ vueMessage }}
<first-component v-bind:time="new Date()"></first-component>
</div>
var path = require('path')
var webpack = require('webpack')
var fs = require('fs')
var appBasePath = './Scripts/app/'
var jsEntries = {}
// We search for index.js files inside basePath folder and make those as entries
fs.readdirSync(appBasePath).forEach(function (name) {
var indexFile = appBasePath + name + '/index.js'
import Vue from 'vue'
import FirstComponent from './FirstComponent.vue'
import {SweetModal, SweetModalTab} from 'sweet-modal-vue'
new Vue({
el: '#app',
components: {
FirstComponent,
SweetModal,
SweetModalTab
<div id="app" class="row">
<div class="text-center">
<button class="btn btn-primary" v-on:click="toggleModal">Show modal!</button>
<sweet-modal ref="modal">
<h3>@ViewBag.Message</h3>
</sweet-modal>
</div>
</div>