How to use the dayjs.format function in dayjs

To help you get started, we’ve selected a few dayjs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github iamoldli / NetModular / src / Module / PersonnelFiles / UI / module-personnelfiles / vue.config.js View on Github external
const path = require('path')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
const isDev = process.env.NODE_ENV === 'development' // 开发环境

// 增加环境变量
process.env.VUE_APP_BUILD_TIME = require('dayjs')().format('YYYYMDHHmmss')
// 打包输出路径
const outputDir = '../../WebHost/wwwroot'

module.exports = {
  outputDir: outputDir,
  devServer: {
    port: 5223
  },
  transpileDependencies: ['nm-.*', 'element-ui'],
  configureWebpack: {
    plugins: [
      /**
       * 复制nm-lib-skins/public目录下的文件到输出目录
       */
      new CopyWebpackPlugin([
        {
github iamoldli / NetModular / src / Module / Common / UI / nm-module-common / vue.config.js View on Github external
const path = require('path')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
const isDev = process.env.NODE_ENV === 'development' // 开发环境

// 增加环境变量
process.env.VUE_APP_BUILD_TIME = require('dayjs')().format('YYYYMDHHmmss')
// 打包输出路径
const outputDir = '../../WebHost/wwwroot'

module.exports = {
  outputDir: outputDir,
  devServer: {
    port: 5220
  },
  transpileDependencies: ['nm-.*', 'element-ui'],
  configureWebpack: {
    plugins: [
      /**
       * 复制nm-lib-skins/public目录下的文件到输出目录
       */
      new CopyWebpackPlugin([
        {
github d2-projects / d2-admin / vue.config.js View on Github external
const CompressionWebpackPlugin = require('compression-webpack-plugin')
const VueFilenameInjector = require('@d2-projects/vue-filename-injector')
const ThemeColorReplacer = require('webpack-theme-color-replacer')
const forElementUI = require('webpack-theme-color-replacer/forElementUI')
const cdnDependencies = require('./dependencies-cdn')

// 拼接路径
const resolve = dir => require('path').join(__dirname, dir)

// 增加环境变量
process.env.VUE_APP_VERSION = require('./package.json').version
process.env.VUE_APP_BUILD_TIME = require('dayjs')().format('YYYY-M-D HH:mm:ss')

// 基础路径 注意发布之前要先修改这里
let publicPath = process.env.VUE_APP_PUBLIC_PATH || '/'

// 设置不参与构建的库
let externals = {}
cdnDependencies.forEach(package => { externals[package.name] = package.library })

// 引入文件的 cdn 链接
const cdn = {
  css: cdnDependencies.map(e => e.css).filter(e => e),
  js: cdnDependencies.map(e => e.js).filter(e => e)
}

module.exports = {
  // 根据你的实际情况更改这里
github iamoldli / NetModular / src / WebUI / vue.config.js View on Github external
const path = require('path')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
const isDev = process.env.NODE_ENV === 'development' // 开发环境

// 增加环境变量
process.env.VUE_APP_BUILD_TIME = require('dayjs')().format('YYYYMDHHmmss')
// 打包输出路径
const outputDir = '../WebHost/wwwroot/app'

module.exports = {
  outputDir: outputDir,
  publicPath: '/app',
  devServer: {
    port: 5220
  },
  transpileDependencies: ['nm-.*', 'element-ui'],
  configureWebpack: {
    plugins: [
      /**
       * 复制nm-lib-skins/public目录下的文件到输出目录
       */
      new CopyWebpackPlugin([
github greper / d2-crud-plus / packages / d2-crud-plus-example / vue.config.js View on Github external
const VueFilenameInjector = require('./tools/vue-filename-injector')

// 拼接路径
const resolve = dir => require('path').join(__dirname, dir)

// 增加环境变量
process.env.VUE_APP_VERSION = require('./package.json').version
process.env.VUE_APP_BUILD_TIME = require('dayjs')().format('YYYY-M-D HH:mm:ss')

// 基础路径 注意发布之前要先修改这里
let publicPath = process.env.VUE_APP_PATH

module.exports = {
  publicPath, // 根据你的实际情况更改这里
  lintOnSave: true,
  devServer: {
    publicPath, // 和 publicPath 保持一致
    proxy: {
      '/api': {
        target: 'http://127.0.0.1:7070',
        ws: true,
        pathRewrite: {
          '^/api': '/api'
        }
github iamoldli / NetModular / src / Library_UI / nm-lib-skins / vue.config.js View on Github external
// 增加环境变量
process.env.VUE_APP_BUILD_TIME = require('dayjs')().format('YYYYMDHHmmss')
process.env.VUE_APP_VERSION = require('./package.json').version

const path = require('path')
module.exports = {
  devServer: {
    port: 6220
  },
  publicPath: './',
  transpileDependencies: ['nm-lib-.*', 'element-ui'],
  configureWebpack: {
    resolve: {
      // 配置解析别名
      alias: {
        '@': path.resolve(__dirname, './src'),
        '@api': path.resolve(__dirname, './src/api'),
        '@views': path.resolve(__dirname, './src/views'),
github hank-cp / d2-admin-start-kit-plus / vue.config.js View on Github external
const CompressionWebpackPlugin = require('compression-webpack-plugin')
const VueFilenameInjector = require('@d2-projects/vue-filename-injector')
const ThemeColorReplacer = require('webpack-theme-color-replacer')
const forElementUI = require('webpack-theme-color-replacer/forElementUI')
const cdnDependencies = require('./dependencies-cdn')

// 拼接路径
const resolve = dir => require('path').join(__dirname, dir)

// 增加环境变量
process.env.VUE_APP_VERSION = require('./package.json').version
process.env.VUE_APP_BUILD_TIME = require('dayjs')().format('YYYY-M-D HH:mm:ss')

// 基础路径 注意发布之前要先修改这里
let publicPath = process.env.VUE_APP_PUBLIC_PATH || '/'

// 设置不参与构建的库
let externals = {}
cdnDependencies.forEach(package => { externals[package.name] = package.library })

// 引入文件的 cdn 链接
const cdn = {
  css: cdnDependencies.map(e => e.css).filter(e => e),
  js: cdnDependencies.map(e => e.js).filter(e => e)
}

module.exports = {
  // 根据你的实际情况更改这里
github iamoldli / NetModular / src / Admin / UI / module-admin / vue.config.js View on Github external
const path = require('path')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const TerserPlugin = require('terser-webpack-plugin')
// 开发环境
const isDev = process.env.NODE_ENV === 'development'
// 打包输出路径
const outputDir = '../../WebHost/wwwroot/app'

// 环境变量
/**版权信息 */
process.env.VUE_APP_COPYRIGHT = '版权所有:尼古拉斯·老李 | 用代码改变世界'
/**版本号 */
process.env.VUE_APP_BUILD_TIME = require('dayjs')().format('YYYYMDHHmmss')
/**第三方依赖组件,写法示例: */
process.env.VUE_APP_CUSTOM_SCRIPTS = ''

module.exports = {
  outputDir: outputDir,
  publicPath: '/app',
  devServer: {
    port: 5220
  },
  transpileDependencies: ['netmodular-*', 'element-ui'],
  configureWebpack() {
    let config = {
      plugins: [
        /**
         * 复制netmodular-ui/public目录下的文件到输出目录
         */
github d2-projects / d2-admin-ice / vue-materials / scaffolds / d2-admin-ice / vue.config.js View on Github external
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
const VueFilenameInjector = require('./tools/vue-filename-injector')

// 拼接路径
const resolve = dir => require('path').join(__dirname, dir)

// 增加环境变量
// 注意 飞冰会在下载脚手架之后 package.json version 强制变为 1.0.0 所以在这里标记版本
process.env.VUE_APP_VERSION = '1.4.3'
process.env.VUE_APP_BUILD_TIME = require('dayjs')().format('YYYY-M-D HH:mm:ss')

// 基础路径 注意发布之前要先修改这里
let publicPath = '/'

module.exports = {
  publicPath, // 根据你的实际情况更改这里
  lintOnSave: true,
  devServer: {
    publicPath // 和 publicPath 保持一致
  },
  css: {
    loaderOptions: {
      // 设置 scss 公用变量文件
      sass: {
        data: `@import '~@/assets/style/public.scss';`
      }
github iamoldli / NetModular / src / Module / CodeGenerator / UI / module-code-generator / vue.config.js View on Github external
const path = require('path')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
const isDev = process.env.NODE_ENV === 'development' // 开发环境

// 增加环境变量
process.env.VUE_APP_BUILD_TIME = require('dayjs')().format('YYYYMDHHmmss')

module.exports = {
  devServer: {
    port: 5226
  },
  transpileDependencies: ['nm-.*', 'element-ui'],
  configureWebpack: {
    plugins: [
      /**
       * 复制nm-lib-skins/public目录下的文件到输出目录
       */
      new CopyWebpackPlugin([
        {
          from: path.join(__dirname, 'node_modules/nm-lib-skins/public'),
          to: path.join(__dirname, 'dist'),
          ignore: ['index.html']

dayjs

2KB immutable date time library alternative to Moment.js with the same modern API

MIT
Latest version published 2 months ago

Package Health Score

88 / 100
Full package analysis