1.3.5 • Published 11 months ago

dom-open-sourcecode v1.3.5

Weekly downloads
-
License
MIT
Repository
-
Last release
11 months ago

Dom-Open-Sourcecode

A handy tool that helps developers quickly find source code from the DOM and evoke the IDE

Usage

Untill now (< 1.0.0), this tool only supports Vue, and plans to support React after version 1.0.0

Install

npm install dom-open-sourcecode -D

Vue

Only need to config in vue.config.js

/**
 * @DOSVue : constructor
 * @DOSVueInsertScriptPlugin : Webpack Plugin
 */
const {
  DOSVue,
  DOSVueInsertScriptPlugin,
} = require("dom-open-sourcecode");

const DOSVueConfig: {
  // The port of your devServer you have launched
  port: string;

  // The attribute key you would like to attached on DOM element which use 'data-source-code-location' as default
  domAttribute?: string;

  // The url path you would like to use for this function which use '/code' as default
  urlPath?: string;
} = {
  port: "8080",
};

// Step1 : new DOSVue instance
const dosVue = new DOSVue(DOSVueConfig);

module.exports = {
  devServer: {
    port: 8080,
    // Step2 : Insert dosVue.serverConfig,
    ...dosVue.serverConfig,
    // ......
  },
  chainWebpack: (config) => {
    /**
     * Although this loader will not break your logic code or do any things which have some sideeffects
     * The only thing this loader do this to attched one customized attribute on some DOM elements
     * But I still recommend turning it on only when developing locally
     */

    // Step3 : config dosVue loader
    config.module.rule("vue").use(dosVue.loader).loader(dosVue.loader).end();
    // ......
  },
  // ......
  configureWebpack: {
    // Step4 : config DOS plugin
    plugins: [new DOSVueInsertScriptPlugin(DOSVueConfig)],
    // ......
  },
};
1.3.5

11 months ago

1.3.4

12 months ago

1.3.3

12 months ago

1.3.2

1 year ago

1.4.0

1 year ago

1.3.1

1 year ago

1.3.0

1 year ago

1.2.0

1 year ago

0.11.0-0

1 year ago

1.0.0

1 year ago

0.7.2-bata

1 year ago

0.10.0-0

1 year ago

0.19.0-0

1 year ago

2.0.0

1 year ago

0.17.0-0

1 year ago

0.18.0-0

1 year ago

0.16.0-0

1 year ago

0.5.0

1 year ago

1.1.0

1 year ago

0.21.0

1 year ago

0.7.0-bata

1 year ago

0.13.0-0

1 year ago

0.21.0-0

1 year ago

0.0.0

1 year ago

0.12.0-0

1 year ago

0.8.0-0

1 year ago

0.7.1-bata

1 year ago

0.20.0-0

1 year ago

0.9.0-0

1 year ago

0.6.1

1 year ago

0.6.0

1 year ago

0.4.0

1 year ago

0.3.0

1 year ago

0.2.0

1 year ago

0.1.36

1 year ago

0.1.35

1 year ago

0.1.34

1 year ago

0.1.33

1 year ago

0.1.32

1 year ago

0.1.31

1 year ago

0.1.30

1 year ago

0.1.29

1 year ago

0.1.28

1 year ago

0.1.27

1 year ago

0.1.26

1 year ago

0.1.25

1 year ago

0.1.24

1 year ago

0.1.23

1 year ago

0.1.22

1 year ago

0.1.21

1 year ago

0.1.20

1 year ago

0.1.19

1 year ago

0.1.18

1 year ago

0.1.17

1 year ago

0.1.16

1 year ago

0.1.15

1 year ago

0.1.14

1 year ago

0.1.13

1 year ago

0.1.12

1 year ago

0.1.11

1 year ago

0.1.10

1 year ago

0.1.9

1 year ago

0.1.8

1 year ago

0.1.7

1 year ago

0.1.6

1 year ago

0.1.5

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago